Class yii\authclient\OAuthToken

Inheritanceyii\authclient\OAuthToken » yii\base\BaseObject
Available since version2.0

Token represents OAuth token.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined 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

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
defaultExpireDurationParamKey() Fetches default expire duration param key. yii\authclient\OAuthToken

Property Details

$createTimestamp public property

Object creation timestamp.

public integer $createTimestamp null
$tokenParamKey public property

Key in \yii\authclient\params array, which stores token key.

public string $tokenParamKey 'oauth_token'
$tokenSecretParamKey public property

Key in \yii\authclient\params array, which stores token secret key.

public string $tokenSecretParamKey 'oauth_token_secret'

Method Details

defaultExpireDurationParamKey() protected method

Fetches default expire duration param key.

protected string defaultExpireDurationParamKey ( )
return string

Expire duration param key.

getExpireDuration() public method

Returns the token expiration duration.

public integer getExpireDuration ( )
return integer

Token expiration duration.

getExpireDurationParamKey() public method

public string getExpireDurationParamKey ( )
return string

Expire duration param key.

getIsExpired() public method

Checks if token has expired.

public boolean getIsExpired ( )
return boolean

Is token expired.

getIsValid() public method

Checks if token is valid.

public boolean getIsValid ( )
return boolean

Is token valid.

getParam() public method

Returns param by name.

public mixed getParam ( $name )
$name string

Param name.

return mixed

Param value.

getParams() public method

public array getParams ( )
getToken() public method

Returns token value.

public string getToken ( )
return string

Token value.

getTokenSecret() public method

Returns the token secret value.

public string getTokenSecret ( )
return string

Token secret value.

init() public method

public void init ( )
setExpireDuration() public method

Sets token expire duration.

public void setExpireDuration ( $expireDuration )
$expireDuration string

Token expiration duration.

setExpireDurationParamKey() public method

public void setExpireDurationParamKey ( $expireDurationParamKey )
$expireDurationParamKey string

Expire duration param key.

setParam() public method

Sets param by name.

public void setParam ( $name, $value )
$name string

Param name.

$value mixed

Param value,

setParams() public method

public void setParams ( array $params )
$params array
setToken() public method

Sets token value.

public $this setToken ( $token )
$token string

Token value.

return $this

The object itself

setTokenSecret() public method

Sets the token secret value.

public void setTokenSecret ( $tokenSecret )
$tokenSecret string

Token secret.