dbAuthDriver

Extends \jAuthDriverBase Implements \jIAuthDriver

authentification driver for authentification information stored in a database

package

jelix

subpackage

auth_driver

Methods

__construct

__construct( $params) 
inherited

Arguments

$params

change a user password

changePassword(string $login, string $newpassword) 

Arguments

$login

string

the login of the user

$newpassword

string

checkPassword

checkPassword(string $givenPassword, string $currentPasswordHash) : boolean|string
inherited

Arguments

$givenPassword

string

the password to verify

$currentPasswordHash

string

the hash of the real password

Response

boolean|string

false if password does not correspond. True if it is ok. A string containing a new hash if it is ok and need to store a new hash

creates a new user object, with some first data.

createUserObject(string $login, string $password) : object

. Careful : it doesn't create a user in a database for example. Just an object.

Arguments

$login

string

the user login

$password

string

the user password

Response

object

the returned object depends on the driver

hash the given password

cryptPassword(string $password,  $forceOldHash = false) : string
inherited

Arguments

$password

string

the password to hash

$forceOldHash

Response

string

the hash password

return user data corresponding to the given login

getUser(string $login) : object

Arguments

$login

string

the login of the user

Response

object

the user data container

construct the user list

getUserList(string $pattern) : array

Arguments

$pattern

string

'' for all users

Response

array

array of user object

Erase user data of the user $login

removeUser(string $login) 

Arguments

$login

string

the login of the user to remove

store a new user.

saveNewUser(object $user) 

It create the user in a database for example should be call after a call of createUser and after setting some of its properties...

Arguments

$user

object

the user data container

save updated data of a user warning : should not save the password !

updateUser(object $user) 

Arguments

$user

object

the user data container

verify that the password correspond to the login

verifyPassword(string $login, string $password) : object|false

Arguments

$login

string

the login of the user

$password

string

the password to test

Response

object|false

Properties

_params

_params : 
inherited

Type(s)

passwordHashMethod

passwordHashMethod : 
inherited

Type(s)

passwordHashOptions

passwordHashOptions : 
inherited

Type(s)