From 7bfd5b7d0dc6612998ac267d6f6e3fbb91822ba3 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Mon, 18 Apr 2016 12:22:15 +0100 Subject: [PATCH] Added abstract methods for required methods --- src/Entities/Traits/AccessTokenTrait.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/Entities/Traits/AccessTokenTrait.php b/src/Entities/Traits/AccessTokenTrait.php index f45b8b6a..31a8eb48 100644 --- a/src/Entities/Traits/AccessTokenTrait.php +++ b/src/Entities/Traits/AccessTokenTrait.php @@ -13,6 +13,8 @@ use Lcobucci\JWT\Builder; use Lcobucci\JWT\Signer\Key; use Lcobucci\JWT\Signer\Rsa\Sha256; use League\OAuth2\Server\CryptKey; +use League\OAuth2\Server\Entities\ClientEntityInterface; +use League\OAuth2\Server\Entities\ScopeEntityInterface; trait AccessTokenTrait { @@ -36,4 +38,24 @@ trait AccessTokenTrait ->sign(new Sha256(), new Key($privateKey->getKeyPath(), $privateKey->getPassPhrase())) ->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(); }