Class yii\authclient\OAuthToken

Inheritanceyii\authclient\OAuthToken » yii\base\Object
Implementsyii\base\Configurable
Available since version2.0
Source Code https://github.com/yiisoft/yii2-authclient/blob/master/OAuthToken.php

Token represents OAuth token.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__call() Calls the named method which is not a class method. yii\base\Object
__construct() Constructor. yii\base\Object
__get() Returns the value of an object property. yii\base\Object
__isset() Checks if a property is set, i.e. defined and not null. yii\base\Object
__set() Sets value of an object property. yii\base\Object
__unset() Sets an object property to null. yii\base\Object
canGetProperty() Returns a value indicating whether a property can be read. yii\base\Object
canSetProperty() Returns a value indicating whether a property can be set. yii\base\Object
className() Returns the fully qualified name of this class. yii\base\Object
getExpireDuration() Returns the token expiration duration. yii\authclient\OAuthToken
getExpireDurationParamKey() yii\authclient\OAuthToken
getIsExpired() Checks if token has expired. yii\authclient\OAuthToken
getIsValid() Checks if token is valid. yii\authclient\OAuthToken
getParam() Returns param by name. yii\authclient\OAuthToken
getParams() yii\authclient\OAuthToken
getToken() Returns token value. yii\authclient\OAuthToken
getTokenSecret() Returns the token secret value. yii\authclient\OAuthToken
hasMethod() Returns a value indicating whether a method is defined. yii\base\Object
hasProperty() Returns a value indicating whether a property is defined. yii\base\Object
init() Initializes the object. yii\authclient\OAuthToken
setExpireDuration() Sets token expire duration. yii\authclient\OAuthToken
setExpireDurationParamKey() yii\authclient\OAuthToken
setParam() Sets param by name. yii\authclient\OAuthToken
setParams() yii\authclient\OAuthToken
setToken() Sets token value. yii\authclient\OAuthToken
setTokenSecret() Sets the token secret value. 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.

$expireDuration public property
integer getExpireDuration( )
void setExpireDuration$expireDuration )

Token expiration duration.

$expireDurationParamKey public property
string getExpireDurationParamKey( )
void setExpireDurationParamKey$expireDurationParamKey )

Expire duration param key.

$isExpired public read-only property

Is token expired.

$isValid public read-only property

Is token valid.

$params public property
array getParams( )
void setParams( array $params )
$token public property
string getToken( )
static setToken$token )

Token value.

$tokenParamKey public property
string $tokenParamKey 'oauth_token'

Key in $params array, which stores token key.

$tokenSecret public property
string getTokenSecret( )
void setTokenSecret$tokenSecret )

Token secret.

$tokenSecretParamKey public property
string $tokenSecretParamKey 'oauth_token_secret'

Key in $params array, which stores token secret key.

Method Details

defaultExpireDurationParamKey() protected method

Fetches default expire duration param key.

string defaultExpireDurationParamKey( )
return string

Expire duration param key.

getExpireDuration() public method

Returns the token expiration duration.

integer getExpireDuration( )
return integer

Token expiration duration.

getExpireDurationParamKey() public method

string getExpireDurationParamKey( )
return string

Expire duration param key.

getIsExpired() public method

Checks if token has expired.

boolean getIsExpired( )
return boolean

Is token expired.

getIsValid() public method

Checks if token is valid.

boolean getIsValid( )
return boolean

Is token valid.

getParam() public method

Returns param by name.

mixed getParam$name )
$name string

Param name.

return mixed

Param value.

getParams() public method

array getParams( )
getToken() public method

Returns token value.

string getToken( )
return string

Token value.

getTokenSecret() public method

Returns the token secret value.

string getTokenSecret( )
return string

Token secret value.

init() public method

Initializes the object.

This method is invoked at the end of the constructor after the object is initialized with the given configuration.

void init( )
setExpireDuration() public method

Sets token expire duration.

void setExpireDuration$expireDuration )
$expireDuration string

Token expiration duration.

setExpireDurationParamKey() public method

void setExpireDurationParamKey$expireDurationParamKey )
$expireDurationParamKey string

Expire duration param key.

setParam() public method

Sets param by name.

void setParam$name$value )
$name string

Param name.

$value mixed

Param value,

setParams() public method

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

Sets token value.

static setToken$token )
$token string

Token value.

return static

Self reference.

setTokenSecret() public method

Sets the token secret value.

void setTokenSecret$tokenSecret )
$tokenSecret string

Token secret.