Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
/ auth Public archive

Simple auth class for PHP 5.3+

License

Notifications You must be signed in to change notification settings

gglnx/auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Auth

Simple auth class for PHP 5.3+ based on cookies. Also included a password hash class based on phpass (http://www.openwall.com/phpass/) 0.3.

Using Auth

Checking if a user is currently logged in

If the current session is valid you get the User model object as return value.

$user = Auth\Session::check(function($user, $md5) {
	$user = User::findOne()->is('username', $user)->select();
	return array('username' => $user->username, 'password' => $user->password, 'object' => $user);
});

About

Simple auth class for PHP 5.3+

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages