mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-15 17:56:14 +05:30
Added missing methods to auth code storage interface
This commit is contained in:
parent
62f5766908
commit
719b87a40c
@ -11,6 +11,9 @@
|
||||
|
||||
namespace League\OAuth2\Server\Storage;
|
||||
|
||||
use League\OAuth2\Server\Entity\AuthCodeEntity;
|
||||
use League\OAuth2\Server\Entity\ScopeEntity;
|
||||
|
||||
/**
|
||||
* Auth code storage interface
|
||||
*/
|
||||
@ -22,4 +25,26 @@ interface AuthCodeInterface
|
||||
* @return \League\OAuth2\Server\Entity\AuthCodeEntity
|
||||
*/
|
||||
public function get($code);
|
||||
|
||||
/**
|
||||
* Get the scopes for an access token
|
||||
* @param \League\OAuth2\Server\Entity\AuthCodeEntity $token The auth code
|
||||
* @return array Array of \League\OAuth2\Server\Entity\ScopeEntity
|
||||
*/
|
||||
public function getScopes(AuthCodeEntity $token);
|
||||
|
||||
/**
|
||||
* Associate a scope with an acess token
|
||||
* @param \League\OAuth2\Server\Entity\AuthCodeEntity $token The auth code
|
||||
* @param \League\OAuth2\Server\Entity\ScopeEntity $scope The scope
|
||||
* @return void
|
||||
*/
|
||||
public function associateScope(AuthCodeEntity $token, ScopeEntity $scope);
|
||||
|
||||
/**
|
||||
* Delete an access token
|
||||
* @param \League\OAuth2\Server\Entity\AuthCodeEntity $token The access token to delete
|
||||
* @return void
|
||||
*/
|
||||
public function delete(AuthCodeEntity $token);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user