Class yii\authclient\OAuthToken
Inheritance | yii\authclient\OAuthToken » yii\base\BaseObject |
---|---|
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 |
$tokenParamKey | string | Key in \yii\authclient\params array, which stores token key. | yii\authclient\OAuthToken |
$tokenSecretParamKey | string | Key in \yii\authclient\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.
Key in \yii\authclient\params array, which stores token key.
Key in \yii\authclient\params array, which stores token secret key.
Method Details
public void __construct ( array $config = [] ) | ||
$config |
Fetches default expire duration param key.
protected string defaultExpireDurationParamKey ( ) | ||
return | string | Expire duration param key. |
---|
Returns the token expiration duration.
public integer getExpireDuration ( ) | ||
return | integer | Token expiration duration. |
---|
public string getExpireDurationParamKey ( ) | ||
return | string | Expire duration param key. |
---|
Checks if token has expired.
public boolean getIsExpired ( ) | ||
return | boolean | Is token expired. |
---|
Checks if token is valid.
public boolean getIsValid ( ) | ||
return | boolean | Is token valid. |
---|
Returns param by name.
public mixed getParam ( $name ) | ||
$name | string | Param name. |
return | mixed | Param value. |
---|
public array getParams ( ) |
Returns token value.
public string getToken ( ) | ||
return | string | Token value. |
---|
Returns the token secret value.
public string getTokenSecret ( ) | ||
return | string | Token secret value. |
---|
{@inheritdoc}
public void init ( ) |
Sets token expire duration.
public void setExpireDuration ( $expireDuration ) | ||
$expireDuration | string | Token expiration duration. |
public void setExpireDurationParamKey ( $expireDurationParamKey ) | ||
$expireDurationParamKey | string | Expire duration param key. |
Sets param by name.
public void setParam ( $name, $value ) | ||
$name | string | Param name. |
$value | mixed | Param value, |
public void setParams ( array $params ) | ||
$params | array |
Sets token value.
public $this setToken ( $token ) | ||
$token | string | Token value. |
return | $this | The object itself |
---|
Sets the token secret value.
public void setTokenSecret ( $tokenSecret ) | ||
$tokenSecret | string | Token secret. |