cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/4] cxf git commit: Use a Constants to refer to the JWT Token
Date Mon, 12 Oct 2015 16:26:59 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 1f7509eb5 -> 191fbf014


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/f7d923a5
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/f7d923a5
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/f7d923a5

Branch: refs/heads/3.0.x-fixes
Commit: f7d923a5313f15a152802b1f01c1a2738add462a
Parents: 1f7509e
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 17:26:14 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/f7d923a5/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 d2f7cc6..8f87119 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
@@ -35,6 +35,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;
 
@@ -68,7 +69,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/f7d923a5/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