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: Moving list properties constants to JoseConstants
Date Wed, 21 Oct 2015 15:14:46 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 2806c0f0d -> 98d006515


Moving list properties constants to JoseConstants


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

Branch: refs/heads/3.0.x-fixes
Commit: 3487878cafaa7077f4ba73eff8d1a6804c31e58d
Parents: 2806c0f
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Wed Oct 21 15:21:16 2015 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Wed Oct 21 16:13:06 2015 +0100

----------------------------------------------------------------------
 .../jaxrs/AbstractJwsJsonReaderProvider.java    |  6 ++---
 .../jaxrs/AbstractJwsJsonWriterProvider.java    |  6 ++---
 .../rs/security/jose/common/JoseConstants.java  | 23 +++++++++++++++++---
 3 files changed, 26 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/3487878c/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/AbstractJwsJsonReaderProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/AbstractJwsJsonReaderProvider.java
b/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/AbstractJwsJsonReaderProvider.java
index 094991e..755ac2a 100644
--- a/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/AbstractJwsJsonReaderProvider.java
+++ b/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/AbstractJwsJsonReaderProvider.java
@@ -29,14 +29,13 @@ import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageUtils;
+import org.apache.cxf.rs.security.jose.common.JoseConstants;
 import org.apache.cxf.rs.security.jose.jws.JwsException;
 import org.apache.cxf.rs.security.jose.jws.JwsSignatureVerifier;
 import org.apache.cxf.rs.security.jose.jws.JwsUtils;
 
 public class AbstractJwsJsonReaderProvider {
     protected static final Logger LOG = LogUtils.getL7dLogger(AbstractJwsJsonReaderProvider.class);
-    private static final String RSSEC_SIGNATURE_IN_LIST_PROPS = "rs.security.signature.in.list.properties";
-    private static final String RSSEC_SIGNATURE_LIST_PROPS = "rs.security.signature.list.properties";
     
     private List<JwsSignatureVerifier> sigVerifiers;
     private String defaultMediaType;
@@ -55,7 +54,8 @@ public class AbstractJwsJsonReaderProvider {
         }
         Message m = JAXRSUtils.getCurrentMessage();
         Object propLocsProp = 
-            MessageUtils.getContextualProperty(m, RSSEC_SIGNATURE_IN_LIST_PROPS, RSSEC_SIGNATURE_LIST_PROPS);
+            MessageUtils.getContextualProperty(m, JoseConstants.RSSEC_SIGNATURE_LIST_IN_PROPS,

+                                               JoseConstants.RSSEC_SIGNATURE_LIST_PROPS);
         if (propLocsProp == null) {
             LOG.warning("JWS JSON init properties resource is not identified");
             throw new JwsException(JwsException.Error.NO_INIT_PROPERTIES);

http://git-wip-us.apache.org/repos/asf/cxf/blob/3487878c/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/AbstractJwsJsonWriterProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/AbstractJwsJsonWriterProvider.java
b/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/AbstractJwsJsonWriterProvider.java
index d5068e2..f86cdc9 100644
--- a/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/AbstractJwsJsonWriterProvider.java
+++ b/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/AbstractJwsJsonWriterProvider.java
@@ -34,6 +34,7 @@ import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageUtils;
+import org.apache.cxf.rs.security.jose.common.JoseConstants;
 import org.apache.cxf.rs.security.jose.jws.JwsException;
 import org.apache.cxf.rs.security.jose.jws.JwsJsonProducer;
 import org.apache.cxf.rs.security.jose.jws.JwsSignatureProvider;
@@ -41,8 +42,6 @@ import org.apache.cxf.rs.security.jose.jws.JwsUtils;
 
 public class AbstractJwsJsonWriterProvider {
     protected static final Logger LOG = LogUtils.getL7dLogger(AbstractJwsJsonWriterProvider.class);
-    private static final String RSSEC_SIGNATURE_OUT_LIST_PROPS = "rs.security.signature.out.list.properties";
-    private static final String RSSEC_SIGNATURE_LIST_PROPS = "rs.security.signature.list.properties";
     
     private List<JwsSignatureProvider> sigProviders;
     
@@ -59,7 +58,8 @@ public class AbstractJwsJsonWriterProvider {
         } 
         Message m = JAXRSUtils.getCurrentMessage();
         Object propLocsProp = 
-            MessageUtils.getContextualProperty(m, RSSEC_SIGNATURE_OUT_LIST_PROPS, RSSEC_SIGNATURE_LIST_PROPS);
+            MessageUtils.getContextualProperty(m, JoseConstants.RSSEC_SIGNATURE_LIST_OUT_PROPS,

+                                               JoseConstants.RSSEC_SIGNATURE_LIST_PROPS);
         if (propLocsProp == null) {
             LOG.warning("JWS JSON init properties resource is not identified");
             throw new JwsException(JwsException.Error.NO_INIT_PROPERTIES);

http://git-wip-us.apache.org/repos/asf/cxf/blob/3487878c/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/JoseConstants.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/JoseConstants.java
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/JoseConstants.java
index f2c0b75..c29a08c 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/JoseConstants.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/JoseConstants.java
@@ -122,23 +122,40 @@ public final class JoseConstants {
     public static final String DEPR_RSSEC_SIGNATURE_ALGORITHM = "rs.security.jws.content.signature.algorithm";
     
     /**
-     * The signature properties file for signature creation. If not specified then it falls
back to 
+     * The signature properties file for compact signature creation. If not specified then
it falls back to 
      * RSSEC_SIGNATURE_PROPS.
      */
     public static final String RSSEC_SIGNATURE_OUT_PROPS = "rs.security.signature.out.properties";
     
     /**
-     * The signature properties file for signature verification. If not specified then it
falls back to 
+     * The signature properties file for compact signature verification. If not specified
then it falls back to 
      * RSSEC_SIGNATURE_PROPS.
      */
     public static final String RSSEC_SIGNATURE_IN_PROPS = "rs.security.signature.in.properties";
     
     /**
-     * The signature properties file for signature creation/verification.
+     * The signature properties file for compact signature creation/verification.
      */
     public static final String RSSEC_SIGNATURE_PROPS = "rs.security.signature.properties";
     
     /**
+     * The signature properties file for JSON Serialization signature creation. If not specified
then it 
+     * falls back to RSSEC_SIGNATURE_LIST_PROPS.
+     */
+    public static final String RSSEC_SIGNATURE_LIST_OUT_PROPS = "rs.security.signature.list.out.properties";
+    
+    /**
+     * The signature properties file for JSON Serialization signature verification. If not
specified then it 
+     * falls back to RSSEC_SIGNATURE_LIST_PROPS.
+     */
+    public static final String RSSEC_SIGNATURE_LIST_IN_PROPS = "rs.security.signature.list.in.properties";
+    
+    /**
+     * The signature properties file for JSON Serialization signature creation/verification.
+     */
+    public static final String RSSEC_SIGNATURE_LIST_PROPS = "rs.security.signature.list.properties";
+    
+    /**
      * TODO documentation for these
      */
     public static final String RSSEC_SIGNATURE_REPORT_KEY_PROP = "rs.security.signature.report.public.key";


Mime
View raw message