Class yii\authclient\OAuthToken
Inheritance | yii\authclient\OAuthToken » yii\base\Object |
---|---|
Implements | yii\base\Configurable |
Available since version | 2.0 |
Source Code | https://github.com/yiisoft/yii2-authclient/blob/master/OAuthToken.php |
Token represents OAuth token.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$createTimestamp | integer | Object creation timestamp. | yii\authclient\OAuthToken |
$expireDuration | string | Token expiration duration. | yii\authclient\OAuthToken |
$expireDurationParamKey | string | Expire duration param key. | yii\authclient\OAuthToken |
$isExpired | boolean | Is token expired. | yii\authclient\OAuthToken |
$isValid | boolean | Is token valid. | yii\authclient\OAuthToken |
$params | array | yii\authclient\OAuthToken | |
$token | string | Token value. | yii\authclient\OAuthToken |
$tokenParamKey | string | Key in $params array, which stores token key. | yii\authclient\OAuthToken |
$tokenSecret | string | Token secret. | yii\authclient\OAuthToken |
$tokenSecretParamKey | string | Key in $params array, which stores token secret key. | yii\authclient\OAuthToken |
Public Methods
Protected Methods
Method | Description | Defined By |
---|---|---|
defaultExpireDurationParamKey() | Fetches default expire duration param key. | yii\authclient\OAuthToken |
Property Details
Object creation timestamp.
Token expiration duration.
Expire duration param key.
Is token expired.
Is token valid.
Token value.
Key in $params array, which stores token key.
Token secret.
Key in $params array, which stores token secret key.
Method Details
Fetches default expire duration param key.
string defaultExpireDurationParamKey( ) | ||
return | string | Expire duration param key. |
---|
Returns the token expiration duration.
integer getExpireDuration( ) | ||
return | integer | Token expiration duration. |
---|
string getExpireDurationParamKey( ) | ||
return | string | Expire duration param key. |
---|
Checks if token has expired.
boolean getIsExpired( ) | ||
return | boolean | Is token expired. |
---|
Checks if token is valid.
boolean getIsValid( ) | ||
return | boolean | Is token valid. |
---|
Returns param by name.
mixed getParam( $name ) | ||
$name | string | Param name. |
return | mixed | Param value. |
---|
array getParams( ) |
Returns token value.
string getToken( ) | ||
return | string | Token value. |
---|
Returns the token secret value.
string getTokenSecret( ) | ||
return | string | Token secret value. |
---|
Initializes the object.
This method is invoked at the end of the constructor after the object is initialized with the given configuration.
void init( ) |
Sets token expire duration.
void setExpireDuration( $expireDuration ) | ||
$expireDuration | string | Token expiration duration. |
void setExpireDurationParamKey( $expireDurationParamKey ) | ||
$expireDurationParamKey | string | Expire duration param key. |
Sets param by name.
void setParam( $name, $value ) | ||
$name | string | Param name. |
$value | mixed | Param value, |
void setParams( array $params ) | ||
$params | array |
Sets token value.
static setToken( $token ) | ||
$token | string | Token value. |
return | static | Self reference. |
---|
Sets the token secret value.
void setTokenSecret( $tokenSecret ) | ||
$tokenSecret | string | Token secret. |