cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/3] cxf git commit: Use a Constants to refer to the JWT Token
Date Mon, 12 Oct 2015 14:04:35 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 168b10164 -> 3ce1e1fcc


Use a Constants to refer to the JWT Token


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

Branch: refs/heads/master
Commit: cc1fac2c9b251f8be75a40912c2bd26d02c84e2c
Parents: 8654f83
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Oct 12 12:06:12 2015 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Oct 12 14:14:19 2015 +0100

----------------------------------------------------------------------
 .../cxf/rs/security/jose/jaxrs/JwtAuthenticationClientFilter.java | 3 ++-
 .../java/org/apache/cxf/rs/security/jose/jwt/JwtConstants.java    | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/cc1fac2c/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationClientFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationClientFilter.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationClientFilter.java
index a618857..dc77d15 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationClientFilter.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationClientFilter.java
@@ -34,6 +34,7 @@ import org.apache.cxf.rs.security.jose.JoseUtils;
 import org.apache.cxf.rs.security.jose.jwe.JweHeaders;
 import org.apache.cxf.rs.security.jose.jwt.AbstractJoseJwtProducer;
 import org.apache.cxf.rs.security.jose.jwt.JwtClaims;
+import org.apache.cxf.rs.security.jose.jwt.JwtConstants;
 import org.apache.cxf.rs.security.jose.jwt.JwtToken;
 import org.apache.cxf.rt.security.crypto.CryptoUtils;
 
@@ -67,7 +68,7 @@ public class JwtAuthenticationClientFilter extends AbstractJoseJwtProducer
                                               authScheme + " " + data);
     }
     protected JwtToken getJwtToken(ClientRequestContext requestContext) {
-        return (JwtToken)requestContext.getProperty("jwt.token");
+        return (JwtToken)requestContext.getProperty(JwtConstants.JWT_TOKEN);
     }
     protected String getContextPropertyValue() {
         return Base64UrlUtility.encode(CryptoUtils.generateSecureRandomBytes(16));

http://git-wip-us.apache.org/repos/asf/cxf/blob/cc1fac2c/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtConstants.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtConstants.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtConstants.java
index 2f23e2c..bdbb544 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtConstants.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtConstants.java
@@ -29,6 +29,8 @@ public final class JwtConstants {
     public static final String CLAIM_ISSUED_AT = "iat";
     public static final String CLAIM_JWT_ID = "jti";
     
+    public static final String JWT_TOKEN = "jwt.token";
+    
         
     private JwtConstants() {
         


Mime
View raw message