cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [2/2] cxf-fediz git commit: Log the claims if debug logging is enabled
Date Fri, 26 Feb 2016 17:03:06 GMT
Log the claims if debug logging is enabled


Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/706971b7
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/706971b7
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/706971b7

Branch: refs/heads/master
Commit: 706971b733e8d030a06d1f387906db4210727ebb
Parents: 79f9390
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Feb 26 17:02:44 2016 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Feb 26 17:02:44 2016 +0000

----------------------------------------------------------------------
 .../service/idp/protocols/TrustedIdpOIDCProtocolHandler.java  | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/706971b7/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpOIDCProtocolHandler.java
----------------------------------------------------------------------
diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpOIDCProtocolHandler.java
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpOIDCProtocolHandler.java
index 4cfaf47..cb7fc52 100644
--- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpOIDCProtocolHandler.java
+++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpOIDCProtocolHandler.java
@@ -232,6 +232,13 @@ public class TrustedIdpOIDCProtocolHandler implements TrustedIdpProtocolHandler
                 JwsJwtCompactConsumer jwtConsumer = new JwsJwtCompactConsumer(idToken);
                 JwtToken jwt = jwtConsumer.getJwtToken();
                 
+                if (jwt != null && jwt.getClaims() != null && LOG.isDebugEnabled())
{
+                    LOG.debug("Received Claims:");
+                    for (Map.Entry<String, Object> claim : jwt.getClaims().asMap().entrySet())
{
+                        LOG.debug(claim.getKey() + ": " + claim.getValue());
+                    }
+                }
+                
                 // Validate the Signature
                 String sigAlgo = getProperty(trustedIdp, SIGNATURE_ALGORITHM);
                 if (sigAlgo == null || sigAlgo.isEmpty()) {


Mime
View raw message