mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-02 00:43:11 +05:30
Refresh token removed in Client Credentials Grant
As defined in RFC: http://tools.ietf.org/html/rfc6749#section-4.4.3
This commit is contained in:
parent
be478561b6
commit
4cb4d5ba21
@ -126,7 +126,6 @@ class ClientCredentials implements GrantTypeInterface {
|
||||
|
||||
// Generate an access token
|
||||
$accessToken = SecureKey::make();
|
||||
$refreshToken = ($this->authServer->hasGrantType('refresh_token')) ? SecureKey::make() : null;
|
||||
|
||||
$accessTokenExpires = time() + $this->authServer->getExpiresIn();
|
||||
$accessTokenExpiresIn = $this->authServer->getExpiresIn();
|
||||
@ -142,7 +141,7 @@ class ClientCredentials implements GrantTypeInterface {
|
||||
$authParams['client_id'],
|
||||
null,
|
||||
$accessToken,
|
||||
$refreshToken,
|
||||
null,
|
||||
$accessTokenExpires,
|
||||
'granted'
|
||||
);
|
||||
@ -160,10 +159,6 @@ class ClientCredentials implements GrantTypeInterface {
|
||||
'expires_in' => $accessTokenExpiresIn
|
||||
);
|
||||
|
||||
if ($this->authServer->hasGrantType('refresh_token')) {
|
||||
$response['refresh_token'] = $refreshToken;
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user