introduce api for handling token validation failed exception

This commit is contained in:
Konstantin Schaper
2020-10-08 09:58:51 +02:00
committed by René Pfeuffer
parent 5887c5c268
commit f2a53644b6
6 changed files with 102 additions and 8 deletions

View File

@@ -110,7 +110,7 @@ public class JwtAccessTokenResolverTest {
when(validator.validate(Mockito.any(AccessToken.class))).thenReturn(false);
// expect exception
expectedException.expect(AuthenticationException.class);
expectedException.expect(TokenValidationFailedException.class);
expectedException.expectMessage(Matchers.containsString("token"));
BearerToken bearer = BearerToken.valueOf(compact);