Cheetah
|
Public Member Functions | |
getAuthorizationCode ($code) | |
setAuthorizationCode ($code, $client_id, $user_id, $redirect_uri, $expires, $scope=null) | |
expireAuthorizationCode ($code) | |
Public Attributes | |
const | RESPONSE_TYPE_CODE = "code" |
Implement this interface to specify where the OAuth2 Server should get/save authorization codes for the "Authorization Code" grant type
Definition at line 12 of file AuthorizationCodeInterface.php.
OAuth2\Storage\AuthorizationCodeInterface::expireAuthorizationCode | ( | $code | ) |
once an Authorization Code is used, it must be exipired
The client MUST NOT use the authorization code more than once. If an authorization code is used more than once, the authorization server MUST deny the request and SHOULD revoke (when possible) all tokens previously issued based on that authorization code
Implemented in OAuth2\Storage\Redis, OAuth2\Storage\Pdo, OAuth2\Storage\Mongo, OAuth2\Storage\Memory, OAuth2\Storage\DynamoDB, OAuth2\Storage\CouchbaseDB, and OAuth2\Storage\Cassandra.
OAuth2\Storage\AuthorizationCodeInterface::getAuthorizationCode | ( | $code | ) |
Fetch authorization code data (probably the most common grant type).
Retrieve the stored data for the given authorization code.
Required for OAuth2::GRANT_TYPE_AUTH_CODE.
$code | Authorization code to be check with. |
Implemented in OAuth2\Storage\Redis, OAuth2\Storage\Pdo, OAuth2\Storage\Mongo, OAuth2\Storage\Memory, OAuth2\Storage\DynamoDB, OAuth2\Storage\CouchbaseDB, and OAuth2\Storage\Cassandra.
OAuth2\Storage\AuthorizationCodeInterface::setAuthorizationCode | ( | $code, | |
$client_id, | |||
$user_id, | |||
$redirect_uri, | |||
$expires, | |||
$scope = null |
|||
) |
Take the provided authorization code values and store them somewhere.
This function should be the storage counterpart to getAuthCode().
If storage fails for some reason, we're not currently checking for any sort of success/failure, so you should bail out of the script and provide a descriptive fail message.
Required for OAuth2::GRANT_TYPE_AUTH_CODE.
string | $code | Authorization code to be stored. |
mixed | $client_id | Client identifier to be stored. |
mixed | $user_id | User identifier to be stored. |
string | $redirect_uri | Redirect URI(s) to be stored in a space-separated string. |
int | $expires | Expiration to be stored as a Unix timestamp. |
string | $scope | OPTIONAL Scopes to be stored in space-separated string. |
const OAuth2\Storage\AuthorizationCodeInterface::RESPONSE_TYPE_CODE = "code" |
Definition at line 21 of file AuthorizationCodeInterface.php.