From 5b14253bf23d624897e6565e869b9d052e3eca4b Mon Sep 17 00:00:00 2001 From: Hafez Divandari Date: Sat, 30 Mar 2024 22:06:01 +0330 Subject: [PATCH] formatting --- src/Entities/Traits/AccessTokenTrait.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Entities/Traits/AccessTokenTrait.php b/src/Entities/Traits/AccessTokenTrait.php index f8f7109c3..febd59bf0 100644 --- a/src/Entities/Traits/AccessTokenTrait.php +++ b/src/Entities/Traits/AccessTokenTrait.php @@ -70,16 +70,14 @@ private function convertToJWT(): Token { $this->initJwtConfiguration(); - $builder = $this->jwtConfiguration->builder() + return $this->withBuilder($this->jwtConfiguration->builder() ->permittedFor($this->getClient()->getIdentifier()) ->identifiedBy($this->getIdentifier()) ->issuedAt(new DateTimeImmutable()) ->canOnlyBeUsedAfter(new DateTimeImmutable()) ->expiresAt($this->getExpiryDateTime()) ->relatedTo($this->getSubjectIdentifier()) - ->withClaim('scopes', $this->getScopes()); - - return $this->withBuilder($builder) + ->withClaim('scopes', $this->getScopes())) ->getToken($this->jwtConfiguration->signer(), $this->jwtConfiguration->signingKey()); }