HeaderClient headerClient = new HeaderClient(new JwtAuthenticator("secret"));
headerClient.setHeaderName("Authorization");
headerClient.setPrefixHeader("Bearer");@RequiresAuthentication(clientName = "HeaderClient")
//controller methodcom.nimbusds.jose.JOSEException: Unsupported JWS algorithm RS256, must be HS256, HS384 or HS512
at com.nimbusds.jose.crypto.MACProvider.getJCAAlgorithmName(MACProvider.java:71) ~[nimbus-jose-jwt-4.11.2.jar:4.11.2]
at com.nimbusds.jose.crypto.MACVerifier.verify(MACVerifier.java:151) ~[nimbus-jose-jwt-4.11.2.jar:4.11.2]
at com.nimbusds.jose.JWSObject.verify(JWSObject.java:337) ~[nimbus-jose-jwt-4.11.2.jar:4.11.2]
at org.pac4j.jwt.credentials.authenticator.JwtAuthenticator.validate(JwtAuthenticator.java:116) ~[pac4j-jwt-1.8.5.jar:na]
--
You received this message because you are subscribed to the Google Groups "pac4j-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pac4j-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
org.pac4j.core.exception.TechnicalException: Cannot decrypt / verify JWT
...
Caused by: com.nimbusds.jose.JOSEException: AES/GCM/NoPadding decryption failed: Tag mismatch!
JwtGenerator generator = new JwtGenerator(JWT_SALT);
String token = "";
if (profile != null) {
token = generator.generate(profile);
}
headerClient.setPrefixHeader("Bearer");headerClient.setPrefixHeader("Bearer ");