PHP RestApi
REST is an acronym for REpresentational State Transfer and an architectural style for distributed hypermedia systems.
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Samy\OAuth2\Response Class Reference
Inheritance diagram for Samy\OAuth2\Response:
Samy\RestApi\AbstractResponse Samy\OAuth2\ResponseInterface

Public Member Functions

 getTokenType ()
 
 withTokenType (string $TokenType)
 
 getAccessToken ()
 
 withAccessToken (string $AccessToken)
 
 getRefreshToken ()
 
 withRefreshToken (string $RefreshToken)
 
 getExpiresIn ()
 
 withExpiresIn (int $ExpiresIn)
 
 getScope ()
 
 withScope (string $Scope)
 
 withBody ($StreamInterface)
 
 getBody ()
 
- Public Member Functions inherited from Samy\RestApi\AbstractResponse
 parse (ResponseInterface $ResponseInterface)
 
- Public Member Functions inherited from Samy\OAuth2\ResponseInterface
 getTokenType ()
 
 withTokenType (string $TokenType)
 
 getAccessToken ()
 
 withAccessToken (string $AccessToken)
 
 getRefreshToken ()
 
 withRefreshToken (string $RefreshToken)
 
 getExpiresIn ()
 
 withExpiresIn (int $ExpiresIn)
 
 getScope ()
 
 withScope (string $Scope)
 
 getError ()
 
 withError (string $Error)
 
 getErrorDescription ()
 
 withErrorDescription (string $ErrorDescription)
 
 getErrorUri ()
 
 withErrorUri (string $ErrorUri)
 

Protected Attributes

 $token_type = AuthType::BEARER
 
 $access_token = ""
 
 $refresh_token = ""
 
 $expires_in = 0
 
 $scope = ""
 

Detailed Description

Simple OAuth2 Response implementation.

Member Function Documentation

◆ getAccessToken()

Samy\OAuth2\Response::getAccessToken ( )

Retrieve provided access token.

Returns
string

Implements Samy\OAuth2\ResponseInterface.

◆ getBody()

Samy\OAuth2\Response::getBody ( )

Overwrite Psr7 getBody.

Returns
StreamInterface Returns the body as a stream.

◆ getExpiresIn()

Samy\OAuth2\Response::getExpiresIn ( )

Retrieve provided token duration.

Returns
int

Implements Samy\OAuth2\ResponseInterface.

◆ getRefreshToken()

Samy\OAuth2\Response::getRefreshToken ( )

Retrieve provided refresh token.

Returns
string

Implements Samy\OAuth2\ResponseInterface.

◆ getScope()

Samy\OAuth2\Response::getScope ( )

Retrieve provided scope.

Returns
string

Implements Samy\OAuth2\ResponseInterface.

◆ getTokenType()

Samy\OAuth2\Response::getTokenType ( )

Retrieve provided token type.

Returns
string

Implements Samy\OAuth2\ResponseInterface.

◆ withAccessToken()

Samy\OAuth2\Response::withAccessToken ( string  $AccessToken)

Return an instance with provided access token.

Parameters
[in]string$AccessTokenAccess token
Returns
static

Implements Samy\OAuth2\ResponseInterface.

◆ withBody()

Samy\OAuth2\Response::withBody (   $StreamInterface)

Overwrite Psr7 withBody.

Parameters
[in]mixed$StreamInterfaceBody.
Returns
static

◆ withExpiresIn()

Samy\OAuth2\Response::withExpiresIn ( int  $ExpiresIn)

Return an instance with provided token duration.

Parameters
[in]int$ExpiresInToken duration
Returns
static

Implements Samy\OAuth2\ResponseInterface.

◆ withRefreshToken()

Samy\OAuth2\Response::withRefreshToken ( string  $RefreshToken)

Return an instance with provided refresh token.

Parameters
[in]string$RefreshTokenRefresh token
Returns
static

Implements Samy\OAuth2\ResponseInterface.

◆ withScope()

Samy\OAuth2\Response::withScope ( string  $Scope)

Return an instance with provided scope.

Parameters
[in]string$ScopeScope
Returns
static

Implements Samy\OAuth2\ResponseInterface.

◆ withTokenType()

Samy\OAuth2\Response::withTokenType ( string  $TokenType)

Return an instance with provided token type.

Parameters
[in]string$TokenTypeToken type
Returns
static

Implements Samy\OAuth2\ResponseInterface.

Member Data Documentation

◆ $access_token

Samy\OAuth2\Response::$access_token = ""
protected

describe access token

◆ $expires_in

Samy\OAuth2\Response::$expires_in = 0
protected

describe token duration

◆ $refresh_token

Samy\OAuth2\Response::$refresh_token = ""
protected

describe refresh token

◆ $scope

Samy\OAuth2\Response::$scope = ""
protected

describe scope

◆ $token_type

Samy\OAuth2\Response::$token_type = AuthType::BEARER
protected

describe token type


The documentation for this class was generated from the following file: