AuthorizationCode
- Full name:
\OAuth2\GrantType\AuthorizationCode
- This class implements:
\OAuth2\GrantType\GrantTypeInterface
Properties
storage
authCode
Methods
__construct
Parameters:
Parameter | Type | Description |
---|---|---|
$storage |
\OAuth2\Storage\AuthorizationCodeInterface | - REQUIRED Storage class for retrieving authorization code information |
getQueryStringIdentifier
Get query string identifier
validateRequest
Validate the OAuth request
public validateRequest(\OAuth2\RequestInterface $request, \OAuth2\ResponseInterface $response): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$request |
\OAuth2\RequestInterface | |
$response |
\OAuth2\ResponseInterface |
Throws:
getClientId
Get the client id
getScope
Get the scope
getUserId
Get the user id
createAccessToken
Create access token
public createAccessToken(\OAuth2\ResponseType\AccessTokenInterface $accessToken, mixed $client_id, mixed $user_id, string $scope): array
Parameters:
Parameter | Type | Description |
---|---|---|
$accessToken |
\OAuth2\ResponseType\AccessTokenInterface | |
$client_id |
mixed | - client identifier related to the access token. |
$user_id |
mixed | - user id associated with the access token |
$scope |
string | - scopes to be stored in space-separated string. |
Automatically generated on 2025-03-18