mirror of
https://github.com/anikeen-com/id.git
synced 2026-03-13 13:46:13 +00:00
add refresh token method
Signed-off-by: Maurice Preuß (envoyr) <hello@envoyr.com>
This commit is contained in:
@@ -46,6 +46,20 @@ trait ManagesUsers
|
||||
return $this->post('v1/users', $attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Refreshes the access token using the refresh token.
|
||||
*/
|
||||
public function refreshToken(string $storedRefreshToken, string $scope = ''): Result
|
||||
{
|
||||
return $this->post('../oauth/token', [
|
||||
'grant_type' => 'refresh_token',
|
||||
'refresh_token' => $storedRefreshToken,
|
||||
'client_id' => $this->clientId,
|
||||
'client_secret' => $this->clientSecret,
|
||||
'scope' => $scope,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given email exists.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user