Method | Description | |
---|---|---|
createFromAuthorizationCode ( array $params, $clientId, $clientSecret, |
Creates an Access Token from an Authorization Code. | |
createFromRefreshToken ( array $params, APIContext $apiContext = null ) : |
Creates an Access Token from an Refresh Token. | |
getAccessToken ( ) : string | The access token issued by the authorization server. | |
getExpiresIn ( ) : integer | The lifetime in seconds of the access token. | |
getIdToken ( ) : string | The id_token is a session token assertion that denotes the user's authentication status | |
getRefreshToken ( ) : string | The refresh token, which can be used to obtain new access tokens using the same authorization grant as described in OAuth2.0 RFC6749 in Section 6. | |
getScope ( ) : string | OPTIONAL, if identical to the scope requested by the client; otherwise, REQUIRED. | |
getTokenType ( ) : string | The type of the token issued as described in OAuth2.0 RFC6749 (Section 7.1). Value is case insensitive. | |
setAccessToken ( string $access_token ) | The access token issued by the authorization server. | |
setExpiresIn ( integer $expires_in ) | The lifetime in seconds of the access token. | |
setIdToken ( string $id_token ) | The id_token is a session token assertion that denotes the user's authentication status | |
setRefreshToken ( string $refresh_token ) | The refresh token, which can be used to obtain new access tokens using the same authorization grant as described in OAuth2.0 RFC6749 in Section 6. | |
setScope ( string $scope ) | OPTIONAL, if identical to the scope requested by the client; otherwise, REQUIRED. | |
setTokenType ( string $token_type ) | The type of the token issued as described in OAuth2.0 RFC6749 (Section 7.1). Value is case insensitive. |
public static createFromAuthorizationCode ( array $params, $clientId, $clientSecret, |
||
$params | array | (allowed values are client_id, client_secret, grant_type, code and redirect_uri) (required) client_id from developer portal (required) client_secret from developer portal (required) code is Authorization code previously received from the authorization server (required) redirect_uri Redirection endpoint that must match the one provided during the authorization request that ended in receiving the authorization code. (optional) grant_type is the Token grant type. Defaults to authorization_code |
$apiContext | Optional API Context | |
return |
public createFromRefreshToken ( array $params, APIContext $apiContext = null ) : |
||
$params | array | (allowed values are grant_type and scope) (required) client_id from developer portal (required) client_secret from developer portal (optional) refresh_token refresh token. If one is not passed, refresh token from the current object is used. (optional) grant_type is the Token grant type. Defaults to refresh_token (optional) scope is an array that either the same or a subset of the scope passed to the authorization request |
$apiContext | APIContext | Optional API Context |
return |
public getAccessToken ( ) : string | ||
return | string |
public getExpiresIn ( ) : integer | ||
return | integer |
public getIdToken ( ) : string | ||
return | string |
public getRefreshToken ( ) : string | ||
return | string |
public getTokenType ( ) : string | ||
return | string |
public setAccessToken ( string $access_token ) | ||
$access_token | string |
public setExpiresIn ( integer $expires_in ) | ||
$expires_in | integer |
public setIdToken ( string $id_token ) | ||
$id_token | string |
public setRefreshToken ( string $refresh_token ) | ||
$refresh_token | string |
public setTokenType ( string $token_type ) | ||
$token_type | string |