Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthordanfreak
     
    Hey guys,

    well done with akelos!

    I was just wondering if Akelos has a built in authentication library to login users, administrators etc.

    Daniel
    • CommentAuthorThijs
     

    Nope, there isn't. Not in Rails either if I'm not mistaken.

    But it isn't that hard to build one yourself, and then it's also 100% what you need.

    Bermi implemented a login system in the Editam CMS. But that app is so complicated.. can't get my head around it. I copied snippets from it though to construct a login system by myself. And I also followed this Rails tutorial.

    Most login systems use sessions, but there is HTTP authentication if you want to use it.

    • CommentAuthoralake
     

    I am building a large complex project that will be constructed in libraries. There will be an authentication library a library to read a csv file and write it to a database and a library to read one database table and write it into a Celko tree. These, I plan to share with the Akelos Community. After that, my project gets proprietary.

    I plan to share these libraries as soon as I have them debugged. Because this is my first Akelos project, I'm needing help to accomplish these tasks. Right now, I'm working on the authentication library. I'm having difficulty with functional testing which I've asked help for on another discussion. I am also not getting routed where I want to be and am ending up with a blank page. I'm researching to find where others may have had this problem. The internal flow within Akelos is still difficult for me to figure out.

    If you really want to get impressed, look at the Akelos source code. I'm an old-timer in the programming field, but Bermi is nothing short of a genius!

    • CommentAuthordanfreak
     
    Cheers for your replays guys!

    By the way, is there a akelos library that handles sessions and stores them in a db table?

    Dan
    • CommentAuthordanfreak
     

    ... I found the answer to the db session handling

    Any example about the config code...

    require_once(AK_LIB_DIR.'/AkDbSession.php');    
    $AkDbSession = new AkDbSession();
    $AkDbSession->sessionLife = AK_SESSION_EXPIRE;
    session_set_save_handler (
    array(&$AkDbSession, '_open'),
    array(&$AkDbSession, '_close'),
    array(&$AkDbSession, '_read'),
    array(&$AkDbSession, '_write'),
    array(&$AkDbSession, '_destroy'),
    array(&$AkDbSession, '_gc')
     );
    

    </code>

    ;o)

    • CommentAuthorKaste
     

    AFAIR

    define('AK_SESSION_HANDLER',1)
    

    in config/config.php

    never used it though ;-)

    framework_installer_php will install the expected schema.

    • CommentAuthoralake
     

    I'm using define('AK_SESSION_HANDLER',1); This is what causes the session to be maintained in a database table. AK_SESSION_EXPIRE is a given number of seconds. What I was looking for was an event driven session handler. I would like to specify that the session will expire when the browser is closed or when the browser is navigated away from the project. I guess that I'm pipe dreaming. ;-)

    • CommentAuthorpweil
     
    Thijs, would you be willing to share what you've done with your login system? I've got http auth working fine, but ideally I'd like something more akin to Acts_as_authenticated (the akelos admin plugin is overkill for what I need). I'm sure I could create my own over tie, but it would be really helpful to see some good working examples. Thanks!