Expired PK tokens should not fall back to legacy tokens
Fixes #11919 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
f544c9fec9
commit
b3a92a4e39
|
@ -138,6 +138,8 @@ class Manager implements IProvider {
|
||||||
public function getTokenById(int $tokenId): IToken {
|
public function getTokenById(int $tokenId): IToken {
|
||||||
try {
|
try {
|
||||||
return $this->publicKeyTokenProvider->getTokenById($tokenId);
|
return $this->publicKeyTokenProvider->getTokenById($tokenId);
|
||||||
|
} catch (ExpiredTokenException $e) {
|
||||||
|
throw $e;
|
||||||
} catch (InvalidTokenException $e) {
|
} catch (InvalidTokenException $e) {
|
||||||
return $this->defaultTokenProvider->getTokenById($tokenId);
|
return $this->defaultTokenProvider->getTokenById($tokenId);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue