Skip to content

Commit

Permalink
auth-bundle: handle long access token
Browse files Browse the repository at this point in the history
  • Loading branch information
4rthem committed Aug 10, 2024
1 parent e161403 commit 2c863f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/php/auth-bundle/Security/AccessTokenAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ public function authenticate(Request $request): Passport
}

$accessTokenBadge = new AccessTokenBadge($accessToken);
$user = $this->jwtExtractor->getUserFromToken($token);

return new SelfValidatingPassport(new UserBadge($accessToken, function () use ($token): JwtUser|JwtOauthClient {
return $this->jwtExtractor->getUserFromToken($token);
return new SelfValidatingPassport(new UserBadge($user->getUserIdentifier(), function () use ($user): JwtUser|JwtOauthClient {
return $user;
}), [$accessTokenBadge]);
}

Expand Down

0 comments on commit 2c863f6

Please sign in to comment.