Jelix 1.8.14-pre

classAuthDriver extends jAuthDriverBase
in package
implements jIAuthDriver

Driver for a class which implement an authentification.

Tags
subpackage

auth_driver

see
jAuth
since
1.0a5

Interfaces, Classes and Traits

jIAuthDriver
interface for auth drivers.

Table of Contents

$_params  : mixed
$passwordHashMethod  : mixed
$passwordHashOptions  : mixed
__construct()  : mixed
changePassword()  : bool
change a user password.
checkPassword()  : bool|string
createUserObject()  : object
creates a new user object, with some first data.. Careful : it doesn't create a user in a database for example. Just an object.
cryptPassword()  : string
hash the given password.
getUser()  : object
return user data corresponding to the given login.
getUserList()  : array<string|int, object>
construct the user list.
removeUser()  : mixed
Erase user data of the user $login.
saveNewUser()  : mixed
store a new user.
updateUser()  : mixed
save updated data of a user warning : should not save the password !
verifyPassword()  : false|object
verify that the password correspond to the login.

Properties

Methods

__construct()

public __construct(mixed $params) : mixed
Parameters
$params : mixed
Tags
Return values
mixed

changePassword()

change a user password.

public changePassword(mixed $login, mixed $newpassword) : bool
Parameters
$login : mixed

the login of the user

$newpassword : mixed
Tags
Return values
bool

true if the password has been changed

checkPassword()

public checkPassword(string $givenPassword, string $currentPasswordHash) : bool|string
Parameters
$givenPassword : string

the password to verify

$currentPasswordHash : string

the hash of the real password

Tags
Return values
bool|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

createUserObject()

creates a new user object, with some first data.. Careful : it doesn't create a user in a database for example. Just an object.

public createUserObject(mixed $login, mixed $password) : object
Parameters
$login : mixed

the user login

$password : mixed

the user password

Tags
Return values
object

the returned object depends on the driver

cryptPassword()

hash the given password.

public cryptPassword(string $password[, mixed $forceOldHash = false ]) : string
Parameters
$password : string

the password to hash

$forceOldHash : mixed = false
Tags
Return values
string

the hash password

getUser()

return user data corresponding to the given login.

public getUser(mixed $login) : object
Parameters
$login : mixed

the login of the user

Tags
Return values
object

the user data container

getUserList()

construct the user list.

public getUserList(mixed $pattern) : array<string|int, object>
Parameters
$pattern : mixed

'' for all users

Tags
Return values
array<string|int, object>

array of objects representing the users

removeUser()

Erase user data of the user $login.

public removeUser(mixed $login) : mixed
Parameters
$login : mixed

the login of the user to remove

Tags
Return values
mixed

saveNewUser()

store a new user.

public saveNewUser(mixed $user) : mixed

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

Parameters
$user : mixed

the user data container

Tags
Return values
mixed

updateUser()

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

public updateUser(mixed $user) : mixed
Parameters
$user : mixed

the user data container

Tags
Return values
mixed

verifyPassword()

verify that the password correspond to the login.

public verifyPassword(mixed $login, mixed $password) : false|object
Parameters
$login : mixed

the login of the user

$password : mixed

the password to test

Tags
Return values
false|object

returns the object representing the user

Search results