ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

A3M - Account Authentication & Authorization Module

February 06, 2010 5:48am

Subscribe [107]
  • #226 / Sep 20, 2010 2:38pm

    Peng Kong

    188 posts

    ok so let’s get to how it’s designed and what every code does.

    so that if you wan change password must enter old password. you can add it urself in 5 mins 😉

    then we won’t need to discuss which is the right way or best way… cuz there isn’t one.

    all of us have different use case and needs.

  • #227 / Sep 20, 2010 3:41pm

    sirwan.me

    30 posts

    well my opinion is keep it simple, i kind of agree with pk on this one. this is a powerful lightweight auth, simple for users and designers and developers to use. just keep it simple…

    imo.. all we really need is a roles, permissions, admin area, couple more things and thats it.

    users login in with one button. tho i think gr0uch had more of a ‘registration’ solution to get users to register quicker or something like that..

    i think we should just develope and make A3M with more features. Its almost done really.

  • #228 / Sep 20, 2010 5:11pm

    gr0uch0mars

    26 posts

    Each person will need something different, so even if we agree something every person will custom it. So let’s go with the code, which is the interesting thing!

    Peng Kong you said you had an ACL quite developed? Could we know something about it? How you manage user’s roles and permissions? It’s true we have to understand the code in order to custom it.

    tho i think gr0uch had more of a ‘registration’ solution to get users to register quicker or something like that…

    I thought account authentication was a bit more delicate than authorization, because the former needs code from other people (OAuth, OpenID, Facebook Connect…) which is hard to understand sometimes (at least for me), and the latter, apart from roles and permissions which is what I’d like to know, is simply to code profiles, admin panels to update/ban…

    Although the discussion was interesting, let’s move on to the code.

  • #229 / Sep 20, 2010 6:15pm

    sirwan.me

    30 posts

    makes sense, id like to see how pks done the acl

  • #230 / Sep 21, 2010 6:32am

    Anraiki

    4 posts

    Hi Peng, I need some clarification on installing this module.

    I am quite new to Codeigniter and I am making my first project to have a User Authentication System, and hence you already have one built, I thought I can save some time just by installing yours.

    My problem is installing it.

    I have uploaded a clean CI to the server, and I am wondering where do I put the contents of the a3m folder, and I believe it is the root directory?

    What do I do after that?


    ———————————- [Edit]

    I seem to find my way through. All I did was navigated to the folder and it seems to be working :]

    ———————————- [double-Edit]

    It seems I can’t navigate to the Sign-In or Sign Up or Facebook Connect Pages.

    I have Path Info enabled as well. Any other additional configuration should I make?

    You may ignore what I said. Unless you have further tips and tricks for me that I should consider.

  • #231 / Sep 21, 2010 8:57am

    Hermes Alves

    17 posts

    Hi,

    Congratulations on an excellent initiative Peng, this very interesting work. But I’m with these problems:

    This site is not working, I can not see the demo http://it.euphoriatwentythree.com/projects/a3m/

    You need a hosting provider? Can I get free for you, contact me directly.

    The other problem is I need a guide with instructions on how to put into operation, is there a HOW TO INSTALL?

    Kind regards,

    Hermes Alves
    Country Brazil

  • #232 / Sep 21, 2010 9:59am

    sirwan.me

    30 posts

    I have wrote a half written tutorial here: http://sirwan.me/web-design-and-development/codeigniter/installing-a3m/

    on how to install it if anyones interested.

  • #233 / Sep 21, 2010 11:13am

    Peng Kong

    188 posts

    Hi Peng, I need some clarification on installing this module.

    I am quite new to Codeigniter and I am making my first project to have a User Authentication System, and hence you already have one built, I thought I can save some time just by installing yours.

    My problem is installing it.

    I have uploaded a clean CI to the server, and I am wondering where do I put the contents of the a3m folder, and I believe it is the root directory?

    What do I do after that?


    ———————————- [Edit]

    I seem to find my way through. All I did was navigated to the folder and it seems to be working :]

    ———————————- [double-Edit]

    It seems I can’t navigate to the Sign-In or Sign Up or Facebook Connect Pages.

    I have Path Info enabled as well. Any other additional configuration should I make?

    You may ignore what I said. Unless you have further tips and tricks for me that I should consider.

    download a3m. and upload it. it’s a whole package with CI already.
    simply change your htaccess, config and database files.

  • #234 / Sep 21, 2010 11:15am

    Peng Kong

    188 posts

    sirwan thanks for the installation guide!

  • #235 / Sep 21, 2010 11:33am

    Peng Kong

    188 posts

    ok let’s talk about the package file structure today.

    in root folder

    /css - put css style sheets .css
    /img - put your images .jpg, .gif, etc
    /js - put your javascripts .js
    /uploads - user uploaded files (profile pic, etc)
    /system - CORE FILES - DO NOT TOUCH - let CI/ellislab/opensourcecommunity maintain this
    /system/cache - has 3 folders to cache the stuff openid needs
    /system/logs - you can clear your cache here
    /system/application - all our stuff goes here
    /system/application/controllers
    /system/application/models
    /system/application/views - im not really using these as i’ve used HMVC by wiredesignz therefore a3m is located at
    /system/application/library
    Controller, Modules and MY_Router is necessary for HMVC to work
    MY_Session is a modification i made to allow us to do “remmeber me” and KeepAllSessionFlashData.

    /system/application/module/account <—this is where all the a3m files are kept.
    account/controller <—the naming should be obvious. Each controller should roughly map to one page which the user sees taking care of requests to that page
    account/helper <—ssl_helper is something i created to help us create https a3m systems
    account/language <—all text in views come from language files the naming should be obvious which views use which language files.
    account/models <—models -.- don’t need i think explain that
    account/library <—things which you should load from your main application.
    a3m should remain in the hmvc module folder… you should code your main application in the /application folder. you should called the a3m libraries by doing a $this->load->library(‘account/authentication’); look at the /application/controller/home.php file and see how i loaded the a3m authentication and user library
    account/plugins <—external libraries are stored in the ‘library’ folder in the plugins folder. plugins are used to load the external libraries. DO NOT hack external libraries let their respective open source community manage them. if you hack it report to the respective community so it gets updated in the next version and you can replace the whole library.
    account/views <—your xhtml + css. follows yahoo best practice. css loaded in header. js loaded at the end of body tag. using gs960 grid (which you of cuz can throw away) and use something else.

  • #236 / Sep 21, 2010 11:41am

    Peng Kong

    188 posts

    so example you want to replace twitter’s package. all you need to do is go to the account/plugin/library folder… delete “jmathai-twitter-async”. modify the “twitter_pi.php” in account/plugin folder.

    juz simply do a search with dreamweaver for “$this->load->plugin(‘twitter’);” (in a3m i NEVER autoload anything to peek performace. everything is always loaded only when it’s needed)

    you’ll see that controller/sign_in_twitter and controller/account_linked both loads the plugin.
    juz study those two files and change to the new codes. everything is well commented so you shouldn’t be lost.

    and nothing else will break cuz it’s loosely coupled.

  • #237 / Sep 21, 2010 11:52am

    Peng Kong

    188 posts

    ok another example. add check current password before letting user change password.

    open account_password.php add in one more input file, call it “password_current_password”
    look for the controller, it’s the same name (duh), “account_password.php”.
    add in the validation rules, in the run() simply check before updating! use the authentication library’s check_password() function. if fail remember to set the flashdata password_error to inform the user. note you can either do _info or _error depending on whether it’s a success or failure. in the css _info is in green. _error is in red.

    simple right?

  • #238 / Sep 21, 2010 1:05pm

    Hermes Alves

    17 posts

    Thanks 4 this “how to install”!

    Peng a suggestion: You could add the download package readme A3M a link to this tutorial for installation.

    Regards,

    Hermes Alves

  • #239 / Sep 21, 2010 2:08pm

    sirwan.me

    30 posts

    If you have any questions on the installation, than ask them on this article, Lets keep this Forum thread about the Development of A3M rather than just minor support questions.

    http://sirwan.me/web-design-and-development/codeigniter/installing-a3m/

  • #240 / Sep 21, 2010 2:18pm

    Hermes Alves

    17 posts

    I’ve seen the link and the tutorial was too much. Only suggest that added the link in the readme project hosted on google.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases