TokenValidation { public static TokenValidation buildIdTokenValidator(String tokenJwtValue, SignatureVerifier verifier, KeyInfoService keyInfoService) { IdTokenValidation idTokenValidation = new IdTokenValidation(tokenJwtValue, keyInfoService); idTokenValidation.checkSignature(verifier); return idTokenValidation; } private  TokenValidation(String token, KeyInfoService keyInfoService); static TokenValidation buildAccessTokenValidator(String tokenJwtValue, KeyInfoService keyInfoService); static TokenValidation buildRefreshTokenValidator(String tokenJwtValue, KeyInfoService keyInfoService); static TokenValidation buildIdTokenValidator(String tokenJwtValue, SignatureVerifier verifier, KeyInfoService keyInfoService); TokenValidation checkSignature(); TokenValidation checkSignature(SignatureVerifier verifier); TokenValidation checkIssuer(String issuer); TokenValidation checkExpiry(); TokenValidation checkClientAndUser(ClientDetails client, UaaUser user); TokenValidation checkRevocationSignature(List<String> revocableSignatureList); TokenValidation checkAudience(String... clients); TokenValidation checkRevocableTokenStore(RevocableTokenProvisioning revocableTokenProvisioning); Jwt getJwt(); Map<String, Object> getClaims(); TokenValidation checkJti(); ClientDetails getClientDetails(MultitenantClientServices clientDetailsService); UaaUser getUserDetails(UaaUserDatabase userDatabase);  }
@Test public void buildIdTokenValidator_performsSignatureValidation() { ChainedSignatureVerifier signatureVerifier = mock(ChainedSignatureVerifier.class); buildIdTokenValidator(getToken(), signatureVerifier, new KeyInfoService("https: verify(signatureVerifier).verify(any(), any()); }