PHP Class Pimcore\Tool\Authentication

Show file Open project: pimcore/pimcore Class Usage Examples

Public Methods

Method Description
authenticateHttpBasic ( ) : User
authenticatePlaintext ( $username, $password ) : null | User
authenticateSession ( ) : User
authenticateToken ( $username, $token, boolean $adminRequired = false ) : null | User
generateToken ( $username, $passwordHash ) : string
getPasswordHash ( $username, $plainTextPassword ) : boolean | false | string
isValidUser ( $user ) : boolean
preparePlainTextPassword ( $username, $plainTextPassword ) : string
tokenDecrypt ( $passwordHash, $token ) : array
verifyPassword ( User $user, $password ) : boolean

Method Details

authenticateHttpBasic() public static method

public static authenticateHttpBasic ( ) : User
return Pimcore\Model\User

authenticatePlaintext() public static method

public static authenticatePlaintext ( $username, $password ) : null | User
$username
$password
return null | Pimcore\Model\User

authenticateSession() public static method

public static authenticateSession ( ) : User
return Pimcore\Model\User

authenticateToken() public static method

public static authenticateToken ( $username, $token, boolean $adminRequired = false ) : null | User
$username
$token
$adminRequired boolean
return null | Pimcore\Model\User

generateToken() public static method

public static generateToken ( $username, $passwordHash ) : string
$username
$passwordHash
return string

getPasswordHash() public static method

public static getPasswordHash ( $username, $plainTextPassword ) : boolean | false | string
$username
$plainTextPassword
return boolean | false | string

isValidUser() public static method

public static isValidUser ( $user ) : boolean
$user
return boolean

preparePlainTextPassword() public static method

public static preparePlainTextPassword ( $username, $plainTextPassword ) : string
$username
$plainTextPassword
return string

tokenDecrypt() public static method

public static tokenDecrypt ( $passwordHash, $token ) : array
$passwordHash
$token
return array

verifyPassword() public static method

public static verifyPassword ( User $user, $password ) : boolean
$user Pimcore\Model\User
$password
return boolean