setAuthorizationCode()
setAuthorizationCode(string $code, mixed $client_id, mixed $user_id, string $redirect_uri, integer $expires, string $scope = null, string $id_token = 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.
Parameters
| 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.
|
| integer |
$expires |
- expiration to be stored as a Unix timestamp.
|
| string |
$scope |
- OPTIONAL scopes to be stored in space-separated string.
|
| string |
$id_token |
- OPTIONAL the OpenID Connect id_token.
|