Welcome Guest, Not a member yet? Register   Sign In
Logrus_auth authentication
#1

[eluser]Patrick Spence[/eluser]

I will do more documentation. I also have some more things to put in, like group management. But here is a core auth package I have been working on for my own projects.

https://github.com/ariven/logrus-auth

logrus-auth
===========

Authentication package for CodeIgniter 2.1x

required:
This uses the fantastic base model extension by Jamie Rumbelow, found here:
https://github.com/jamierumbelow/codeigniter-base-model

You should be able to modify the models to not use it if you so desire.

Example auth controller included, the main library that does the grunt work is logrus_auth.

The example uses my template library, so the template is included.

It also uses my notify library for emailing password resets. You will need to replace the code in the send routines in libraries/notify.php to whatever method you want to use to send email.

I included a small gravatar grabber helper. (whole 1 line function Smile ) that is used to grab a profile picture/avatar for the member.

Included is sql for mysql. You will need to edit table names if you intend to use a table prefix.

I will update this with better documentation when I get a chance, but for now check the controllers/auth.php file to see how I use it.

passwords are a sha512 hash of the plaintext password, a salt, and optionally a sitewide salt.

The current way that the sessions work, is single log in. If you log in somewhere else, it logs you out of the first session. This is on my @todo list to change at a later date.

#2

[eluser]Patrick Spence[/eluser]
Using Phil Sturgeons great oauth2 library (https://github.com/philsturgeon/codeigniter-oauth2) I have this working to log in via facebook, gmail or windows live if anyone is interested.

I want to add a toggle so that it only offers that option if you tell it to in the config, so there is some cleanup for that as well as making the option to force a email authentication for legacy accounts if needed..
#3

[eluser]Patrick Spence[/eluser]
I have updated Logrus_auth.

I have cleaned up sections, modularized the code more, and added in a basic installer function that helps you set up your initial configuration.

Logrus_auth can be found here: https://github.com/ariven/logrus-auth
#4

[eluser]eggzy[/eluser]
Looks cool, are you planning to add roles/permissions for some basic acl?
#5

[eluser]Patrick Spence[/eluser]
[quote author="eggzy" date="1361019182"]Looks cool, are you planning to add roles/permissions for some basic acl?[/quote]

I have groups for basic permissions.

For example, with group admin... $this->logrus_group->is_member('admin') is a boolean return based on the members membership in that group.

So far I haven't needed more granularity than that, so I haven't had to look much further than basic stuff for it.

My biggest failling is documentation, I need to do a step by step install document, as well as a listing of the various methods available. Hopefully I will get a chance this weekend to work on that.




Theme © iAndrew 2016 - Forum software by © MyBB