PHP Interface AuthBucket\OAuth2\TokenType\TokenTypeHandlerInterface

Author: Wong Hoi Sing Edison ([email protected])
Datei anzeigen Open project: authbucket/oauth2

Public Methods

Method Description
createAccessToken ( string $clientId, string $username = '', array $scope = [], string $state = null, boolean $withRefreshToken = true ) : array Create and save access_token parameters for generate response.
getAccessToken ( Request $request ) : string Fetch access_token from given request.

Method Details

createAccessToken() public method

Create and save access_token parameters for generate response.
public createAccessToken ( string $clientId, string $username = '', array $scope = [], string $state = null, boolean $withRefreshToken = true ) : array
$clientId string client_id this access token should belongs to
$username string username this access token should belongs to
$scope array All scope that this access token grant
$state string Original state which should preserve
$withRefreshToken boolean False for response_type=token
return array All parameters for generate response

getAccessToken() public method

Fetch access_token from given request.
public getAccessToken ( Request $request ) : string
$request Symfony\Component\HttpFoundation\Request Incoming request object
return string Fetched access_token from incoming request