Skip to content

Commit

Permalink
Expired PK tokens should not fall back to legacy tokens
Browse files Browse the repository at this point in the history
Fixes #11919

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
  • Loading branch information
rullzer committed Oct 21, 2018
1 parent f544c9f commit b3a92a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/private/Authentication/Token/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ public function getToken(string $tokenId): IToken {
public function getTokenById(int $tokenId): IToken {
try {
return $this->publicKeyTokenProvider->getTokenById($tokenId);
} catch (ExpiredTokenException $e) {
throw $e;
} catch (InvalidTokenException $e) {
return $this->defaultTokenProvider->getTokenById($tokenId);
}
Expand Down

0 comments on commit b3a92a4

Please sign in to comment.