Property | Type | Description | |
---|---|---|---|
$crypt | Name of the crypt service. | ||
$securityKey | string | Security key used for encrypting the token data. | |
$tokenName | string | Name of the token. | |
$tokenRememberMe | boolean | Should token be remembered |
Method | Description | |
---|---|---|
decryptUserData ( string $tokenData ) : |
Decrypts the provided $tokenData, unserializes the string, creates an instance of TokenData and validates it. | |
encryptUserData ( |
Stores user data into an array, encrypts it and returns the encrypted string. | |
getCrypt ( ) : Webiny\Component\Security\Token\CryptDrivers\CryptDriverInterface | Returns the crypt driver instance. | |
getEncryptionKey ( ) : string | Uses the current key, user session id and browser user agent, to form a new key. | |
getTokenName ( ) : string | Get token name. | |
setCrypt ( Webiny\Component\Security\Token\CryptDrivers\CryptDriverInterface $crypt ) | Sets crypt driver instance. | |
setSecurityKey ( string $securityKey ) | Sets the security key that will be used for encryption of token data. | |
setTokenName ( string $tokenName ) | This function provides the token name to the storage. | |
setTokenRememberMe ( boolean $rememberMe ) | This function provides the token 'remember me' flag to the storage. |
public decryptUserData ( string $tokenData ) : |
||
$tokenData | string | Encrypted data. |
return |
public encryptUserData ( |
||
$user | Instance of AbstractUser class that holds the pre-filled object from user provider. | |
return | string |
public getCrypt ( ) : Webiny\Component\Security\Token\CryptDrivers\CryptDriverInterface | ||
return | Webiny\Component\Security\Token\CryptDrivers\CryptDriverInterface |
public getEncryptionKey ( ) : string | ||
return | string |
public getTokenName ( ) : string | ||
return | string | Token name. |
public setCrypt ( Webiny\Component\Security\Token\CryptDrivers\CryptDriverInterface $crypt ) | ||
$crypt | Webiny\Component\Security\Token\CryptDrivers\CryptDriverInterface | Name of the crypt service. |
public setSecurityKey ( string $securityKey ) | ||
$securityKey | string | Must have 16/32/64 chars. |
public setTokenName ( string $tokenName ) | ||
$tokenName | string | Token name. |
public setTokenRememberMe ( boolean $rememberMe ) | ||
$rememberMe | boolean | Token rememberme. |
protected string $securityKey | ||
return | string |
protected bool $tokenRememberMe | ||
return | boolean |