mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
Added initial examples
This commit is contained in:
@@ -4,13 +4,39 @@ namespace RelationalExample\Storage;
|
||||
|
||||
use League\OAuth2\Server\Storage\AuthCodeInterface;
|
||||
use League\OAuth2\Server\Storage\Adapter;
|
||||
use League\OAuth2\Server\Entity\AuthCodeEntity;
|
||||
use League\OAuth2\Server\Entity\ScopeEntity;
|
||||
|
||||
class AuthCodeStorage extends Adapter implements AuthCodeInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get($token)
|
||||
public function get($code)
|
||||
{
|
||||
die(var_dump(__METHOD__, func_get_args()));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getScopes(AuthCodeEntity $token)
|
||||
{
|
||||
die(var_dump(__METHOD__, func_get_args()));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function associateScope(AuthCodeEntity $token, ScopeEntity $scope)
|
||||
{
|
||||
die(var_dump(__METHOD__, func_get_args()));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function delete(AuthCodeEntity $token)
|
||||
{
|
||||
die(var_dump(__METHOD__, func_get_args()));
|
||||
}
|
||||
|
@@ -4,6 +4,7 @@ namespace RelationalExample\Storage;
|
||||
|
||||
use League\OAuth2\Server\Storage\RefreshTokenInterface;
|
||||
use League\OAuth2\Server\Storage\Adapter;
|
||||
use League\OAuth2\Server\Entity\RefreshTokenEntity;
|
||||
|
||||
class RefreshTokenStorage extends Adapter implements RefreshTokenInterface
|
||||
{
|
||||
@@ -26,8 +27,9 @@ class RefreshTokenStorage extends Adapter implements RefreshTokenInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function delete($token)
|
||||
public function delete(RefreshTokenEntity $token)
|
||||
{
|
||||
die(var_dump(__METHOD__, func_get_args()));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user