PHP Class PayPal\Auth\Openid\PPOpenIdTokeninfo

Inheritance: extends PayPal\Common\PPModel
Show file Open project: paypal/sdk-core-php Class Usage Examples

Public Methods

Method Description
createFromAuthorizationCode ( array $params, $clientId, $clientSecret, PPApiContext $apiContext = null ) : PPOpenIdTokeninfo Creates an Access Token from an Authorization Code.
createFromRefreshToken ( array $params, APIContext $apiContext = null ) : PPOpenIdTokeninfo 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.

Method Details

createFromAuthorizationCode() public static method

Creates an Access Token from an Authorization Code.
public static createFromAuthorizationCode ( array $params, $clientId, $clientSecret, PPApiContext $apiContext = null ) : PPOpenIdTokeninfo
$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 PayPal\Common\PPApiContext Optional API Context
return PPOpenIdTokeninfo

createFromRefreshToken() public method

Creates an Access Token from an Refresh Token.
public createFromRefreshToken ( array $params, APIContext $apiContext = null ) : PPOpenIdTokeninfo
$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 PPOpenIdTokeninfo

getAccessToken() public method

The access token issued by the authorization server.
public getAccessToken ( ) : string
return string

getExpiresIn() public method

The lifetime in seconds of the access token.
public getExpiresIn ( ) : integer
return integer

getIdToken() public method

The id_token is a session token assertion that denotes the user's authentication status
public getIdToken ( ) : string
return string

getRefreshToken() public method

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.
public getRefreshToken ( ) : string
return string

getScope() public method

OPTIONAL, if identical to the scope requested by the client; otherwise, REQUIRED.
public getScope ( ) : string
return string

getTokenType() public method

The type of the token issued as described in OAuth2.0 RFC6749 (Section 7.1). Value is case insensitive.
public getTokenType ( ) : string
return string

setAccessToken() public method

The access token issued by the authorization server.
public setAccessToken ( string $access_token )
$access_token string

setExpiresIn() public method

The lifetime in seconds of the access token.
public setExpiresIn ( integer $expires_in )
$expires_in integer

setIdToken() public method

The id_token is a session token assertion that denotes the user's authentication status
public setIdToken ( string $id_token )
$id_token string

setRefreshToken() public method

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.
public setRefreshToken ( string $refresh_token )
$refresh_token string

setScope() public method

OPTIONAL, if identical to the scope requested by the client; otherwise, REQUIRED.
public setScope ( string $scope )
$scope string

setTokenType() public method

The type of the token issued as described in OAuth2.0 RFC6749 (Section 7.1). Value is case insensitive.
public setTokenType ( string $token_type )
$token_type string