Method |
Description |
|
__construct ( $config = [] ) : void |
Loads Session and configuration options. |
|
check_password ( $password ) |
|
|
factory ( $config = [] ) : Auth |
Create an instance of Auth. |
|
find_salt ( $password ) : string |
Finds the salt from a password, based on the configured salt pattern. |
|
get_user ( ) : mixed |
Gets the currently logged in user from the session. |
|
hash ( $str ) : string |
Perform a hash, using the configured method. |
|
hash_password ( $password, $salt = FALSE ) : string |
Creates a hashed password from a plaintext password, inserting salt
based on the configured salt pattern. |
|
instance ( ) : Auth |
Singleton pattern |
|
logged_in ( $role = NULL ) : mixed |
Check if there is an active session. Optionally allows checking for a
specific role. |
|
login ( $username, $password, $remember = FALSE ) : boolean |
Attempt to log in a user by using an ORM object and plain-text password. |
|
logout ( $destroy = FALSE, $logout_all = FALSE ) : boolean |
Log out a user by removing the related session variables. |
|
password ( $username ) |
|
|