PHP Class ZF\OAuth2\Adapter\IbmDb2Adapter

Inheritance: extends OAuth2\Storage\IbmDb2
ファイルを表示 Open project: zfcampus/zf-oauth2

Protected Properties

Property Type Description
$bcrypt Zend\Crypt\Password\Bcrypt
$bcryptCost integer

Public Methods

Method Description
__construct ( string $connection, array $config = [] )
checkClientCredentials ( string $clientId, null | string $clientSecret = null ) : boolean Check client credentials
getBcrypt ( ) : Zend\Crypt\Password\Bcrypt
setBcryptCost ( $value )
setClientDetails ( string $clientId, null | string $clientSecret = null, null | string $redirectUri = null, null | string $grantTypes = null, null | string $scopeOrUserId = null, null | string $userId = null ) : boolean Set client details
setUser ( string $username, string $password, string $firstName = null, string $lastName = null ) : boolean Set the user

Protected Methods

Method Description
checkPassword ( string $user, string $password ) : boolean Check password using bcrypt
createBcryptHash ( string $string ) : string
verifyHash ( string $check, string $hash ) : boolean Check hash using bcrypt

Method Details

__construct() public method

public __construct ( string $connection, array $config = [] )
$connection string
$config array

checkClientCredentials() public method

Check client credentials
public checkClientCredentials ( string $clientId, null | string $clientSecret = null ) : boolean
$clientId string
$clientSecret null | string
return boolean

checkPassword() protected method

Check password using bcrypt
protected checkPassword ( string $user, string $password ) : boolean
$user string
$password string
return boolean

createBcryptHash() protected method

protected createBcryptHash ( string $string ) : string
$string string
return string

getBcrypt() public method

public getBcrypt ( ) : Zend\Crypt\Password\Bcrypt
return Zend\Crypt\Password\Bcrypt

setBcryptCost() public method

public setBcryptCost ( $value )
$value

setClientDetails() public method

Set client details
public setClientDetails ( string $clientId, null | string $clientSecret = null, null | string $redirectUri = null, null | string $grantTypes = null, null | string $scopeOrUserId = null, null | string $userId = null ) : boolean
$clientId string
$clientSecret null | string
$redirectUri null | string
$grantTypes null | string
$scopeOrUserId null | string If 5 arguments, userId; if 6, scope.
$userId null | string
return boolean

setUser() public method

Set the user
public setUser ( string $username, string $password, string $firstName = null, string $lastName = null ) : boolean
$username string
$password string
$firstName string
$lastName string
return boolean

verifyHash() protected method

Check hash using bcrypt
protected verifyHash ( string $check, string $hash ) : boolean
$check string
$hash string
return boolean

Property Details

$bcrypt protected_oe property

protected Bcrypt,Zend\Crypt\Password $bcrypt
return Zend\Crypt\Password\Bcrypt

$bcryptCost protected_oe property

protected int $bcryptCost
return integer