diff --git a/src/Entities/TokenInterface.php b/src/Entities/TokenInterface.php index 6082e57e1..96d2bd418 100644 --- a/src/Entities/TokenInterface.php +++ b/src/Entities/TokenInterface.php @@ -16,12 +16,24 @@ interface TokenInterface { + /** + * Get the token's identifier. + */ public function getIdentifier(): string; + /** + * Set the token's identifier. + */ public function setIdentifier(mixed $identifier): void; + /** + * Get the token's expiry date time. + */ public function getExpiryDateTime(): DateTimeImmutable; + /** + * Set the date time when the token expires. + */ public function setExpiryDateTime(DateTimeImmutable $dateTime): void; /** @@ -31,15 +43,29 @@ public function setExpiryDateTime(DateTimeImmutable $dateTime): void; */ public function setUserIdentifier(string $identifier): void; + /** + * Get the token user's identifier. + */ public function getUserIdentifier(): string|int|null; + /** + * Get the client that the token was issued to. + */ public function getClient(): ClientEntityInterface; + /** + * Set the client that the token was issued to. + */ public function setClient(ClientEntityInterface $client): void; + /** + * Associate a scope with the token. + */ public function addScope(ScopeEntityInterface $scope): void; /** + * Return an array of scopes associated with the token. + * * @return ScopeEntityInterface[] */ public function getScopes(): array;