![]() |
ErkanaAuth: A non-invasive user authentication library - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: ErkanaAuth: A non-invasive user authentication library (/showthread.php?tid=3821) |
ErkanaAuth: A non-invasive user authentication library - El Forum - 12-05-2007 [eluser]xwero[/eluser] great work tomcode a perfect compagnion for the library. ErkanaAuth: A non-invasive user authentication library - El Forum - 01-01-2008 [eluser]Neovive[/eluser] Michael: This looks great! I downloaded the library from your website, but it appears to be the older version. Is the newly revised "3 method only" version available? ErkanaAuth: A non-invasive user authentication library - El Forum - 01-11-2008 [eluser]benlm[/eluser] Does anyone have a version of the erkana library with the changes/fixes listed in this thread? The library looks good in terms of size and scope, however one thing I don't like is the name of the helper functions getField and getRole. I think they should be renamed to be something like erkana_getField/erkana_getRole or userGetField/userGetRole. ErkanaAuth: A non-invasive user authentication library - El Forum - 01-12-2008 [eluser]tomcode[/eluser] [quote author="benlm" date="1200117851"]Does anyone have a version of the erkana library with the changes/fixes listed in this thread?[quote] There is a version of imzyos on the Wiki. ErkanaAuth: A non-invasive user authentication library - El Forum - 01-13-2008 [eluser]BrandonDurham[/eluser] How do I go about encrypting my cookies for ErkanaAuth? ErkanaAuth: A non-invasive user authentication library - El Forum - 01-13-2008 [eluser]tomcode[/eluser] You can encrypt Your cookies by setting the corresponding value in application/config/config.php. ErkanaAuth: A non-invasive user authentication library - El Forum - 01-13-2008 [eluser]BrandonDurham[/eluser] Ah! Simple, thank you. ErkanaAuth: A non-invasive user authentication library - El Forum - 01-13-2008 [eluser]Michael Wales[/eluser] I've had a few requests for the most recent version of ErkanaAuth (the one including the changes listed here in this thread). Well, it doesn't exist, unfortunately. What I do have is the version of ErkanaAuth that I use within all of my development. I'm down to 3 methods and none of the User Management stuff (roles and such). Here, it is - in all it's glory, with some examples to follow. Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); How I Use It logout() is still used the same way - a direct call within a controller, then redirect somewhere. I still use try_login() the same way as well - within a callback function get_user() is a bit different than what we've seen in the past. I usually extend my Controller class, having all of my classes assign the return value to a variable I can us within my view (for echoing out user info, as needed). For any controllers needing Authorization - I make a valid get_user() return value a requirement. application/libraries/MY_Controller.php Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ErkanaAuth: A non-invasive user authentication library - El Forum - 01-13-2008 [eluser]tomcode[/eluser] I just wonder why You implement it as library and not as model. ErkanaAuth: A non-invasive user authentication library - El Forum - 01-13-2008 [eluser]Michael Wales[/eluser] Because to me, models define data. This has very little to do with data and a lot to do with business logic. A model, for users, would display what fields define a user and the methods used to do things like: create a new user, delete a user, etc. |