use of org.molgenis.security.core.token.UnknownTokenException in project molgenis by molgenis.
the class TokenAuthenticationProviderTest method authenticateInvalidToken.
@Test(expectedExceptions = AuthenticationException.class)
public void authenticateInvalidToken() {
when(tokenService.findUserByToken("token")).thenThrow(new UnknownTokenException("Invalid token"));
tokenAuthenticationProvider.authenticate(new RestAuthenticationToken("token"));
}
Aggregations