Hi all,
I'm testing JWT Service Tickets with a simple javax-rs WebApp based on 
https://github.com/pac4j/jee-pac4j
After login redirect, my application returns an Unauthorized response due 
to the fact that the JWT is not recognized as a JWE token.
Debugging application, I've noticed that it is due to the method 
*parseAlgorithm(final 
JSONObject json)* of the  *com.nimbusds.jose.Header* class because "*enc*" 
property is not present into JWT header.


 if (algName.equals(Algorithm.NONE.getName())) {
 // Plain
 return Algorithm.NONE;
 } else if (json.containsKey("enc")) {
 // JWE
 return JWEAlgorithm.parse(algName);
 } else {
 // JWS
 return JWSAlgorithm.parse(algName);
 }



Any suggestions ? 

Why CAS doesn't put "*enc*" property into the JWT?


My CAS configuration for the JWT Service Tickets is 

cas.authn.token.crypto.enabled=true
cas.authn.token.crypto.encryptionEnabled=true
cas.authn.token.crypto.signingEnabled=true
cas.authn.token.crypto.signing.key=*<**the 512 byte key>*
cas.authn.token.crypto.encryption.key=*<**the 256 bytes key>*



Thanks all.

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/00663a72-fbc4-4ad5-998d-e719e5efce17%40apereo.org.

Reply via email to