mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-23 05:33:06 +05:30
Added abstract methods for required methods
This commit is contained in:
parent
143a2e32f7
commit
7bfd5b7d0d
@ -13,6 +13,8 @@ use Lcobucci\JWT\Builder;
|
|||||||
use Lcobucci\JWT\Signer\Key;
|
use Lcobucci\JWT\Signer\Key;
|
||||||
use Lcobucci\JWT\Signer\Rsa\Sha256;
|
use Lcobucci\JWT\Signer\Rsa\Sha256;
|
||||||
use League\OAuth2\Server\CryptKey;
|
use League\OAuth2\Server\CryptKey;
|
||||||
|
use League\OAuth2\Server\Entities\ClientEntityInterface;
|
||||||
|
use League\OAuth2\Server\Entities\ScopeEntityInterface;
|
||||||
|
|
||||||
trait AccessTokenTrait
|
trait AccessTokenTrait
|
||||||
{
|
{
|
||||||
@ -36,4 +38,24 @@ trait AccessTokenTrait
|
|||||||
->sign(new Sha256(), new Key($privateKey->getKeyPath(), $privateKey->getPassPhrase()))
|
->sign(new Sha256(), new Key($privateKey->getKeyPath(), $privateKey->getPassPhrase()))
|
||||||
->getToken();
|
->getToken();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return ClientEntityInterface
|
||||||
|
*/
|
||||||
|
abstract public function getClient();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \DateTime
|
||||||
|
*/
|
||||||
|
abstract public function getExpiryDateTime();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string|int
|
||||||
|
*/
|
||||||
|
abstract public function getUserIdentifier();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return ScopeEntityInterface[]
|
||||||
|
*/
|
||||||
|
abstract public function getScopes();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user