cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: Removing JwtHeaders and JwsHeaders for now
Date Wed, 15 Oct 2014 12:01:58 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes f1309316e -> 61f520d3a


Removing JwtHeaders and JwsHeaders for now


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

Branch: refs/heads/3.0.x-fixes
Commit: 61f520d3a83182ec2c8fe789b6a897fbddeb67fb
Parents: f130931
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Wed Oct 15 13:00:22 2014 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Wed Oct 15 13:01:38 2014 +0100

----------------------------------------------------------------------
 .../jose/jaxrs/AbstractJwsWriterProvider.java   |  4 +-
 .../jose/jaxrs/JwsClientResponseFilter.java     |  2 +-
 .../jose/jaxrs/JwsContainerRequestFilter.java   |  2 +-
 .../jose/jaxrs/JwsJwtMessageBodyWriter.java     |  4 +-
 .../jose/jaxrs/JwsWriterInterceptor.java        |  7 ++-
 .../jose/jws/AbstractJwsSignatureProvider.java  | 10 ++--
 .../jose/jws/HmacJwsSignatureProvider.java      |  3 +-
 .../jose/jws/HmacJwsSignatureVerifier.java      |  6 +--
 .../security/jose/jws/JwsCompactConsumer.java   |  6 +--
 .../security/jose/jws/JwsCompactProducer.java   | 17 ++++---
 .../cxf/rs/security/jose/jws/JwsHeaders.java    | 37 --------------
 .../jose/jws/JwsJwtCompactProducer.java         | 10 ++--
 .../security/jose/jws/JwsSignatureProvider.java |  4 +-
 .../security/jose/jws/JwsSignatureVerifier.java |  4 +-
 .../jws/PrivateKeyJwsSignatureProvider.java     |  3 +-
 .../jose/jws/PublicKeyJwsSignatureVerifier.java |  4 +-
 .../cxf/rs/security/jose/jwt/JwtHeaders.java    | 53 --------------------
 .../cxf/rs/security/jose/jwt/JwtToken.java      |  8 +--
 .../security/jose/jwt/JwtTokenReaderWriter.java |  8 +--
 .../jose/jws/JwsCompactReaderWriterTest.java    | 29 ++++++-----
 .../jose/jwt/grant/AbstractJwtHandler.java      |  4 +-
 .../jose/jwt/token/JwtAccessTokenUtils.java     |  4 +-
 22 files changed, 74 insertions(+), 155 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/AbstractJwsWriterProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/AbstractJwsWriterProvider.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/AbstractJwsWriterProvider.java
index 8d3fbd9..8f5b1a0 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/AbstractJwsWriterProvider.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/AbstractJwsWriterProvider.java
@@ -30,13 +30,13 @@ import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.jaxrs.utils.ResourceUtils;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageUtils;
+import org.apache.cxf.rs.security.jose.JoseHeaders;
 import org.apache.cxf.rs.security.jose.jwk.JsonWebKey;
 import org.apache.cxf.rs.security.jose.jwk.JwkUtils;
 import org.apache.cxf.rs.security.jose.jws.JwsCompactProducer;
 import org.apache.cxf.rs.security.jose.jws.JwsSignatureProvider;
 import org.apache.cxf.rs.security.jose.jws.JwsUtils;
 import org.apache.cxf.rs.security.jose.jws.PrivateKeyJwsSignatureProvider;
-import org.apache.cxf.rs.security.jose.jwt.JwtHeaders;
 
 public class AbstractJwsWriterProvider {
     private static final String RSSEC_SIGNATURE_OUT_PROPS = "rs.security.signature.out.properties";
@@ -49,7 +49,7 @@ public class AbstractJwsWriterProvider {
         this.sigProvider = signatureProvider;
     }
     
-    protected JwsSignatureProvider getInitializedSigProvider(JwtHeaders headers) {
+    protected JwsSignatureProvider getInitializedSigProvider(JoseHeaders headers) {
         if (sigProvider != null) {
             return sigProvider;    
         } 

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsClientResponseFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsClientResponseFilter.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsClientResponseFilter.java
index 64a1cfa..840c971 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsClientResponseFilter.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsClientResponseFilter.java
@@ -43,7 +43,7 @@ public class JwsClientResponseFilter extends AbstractJwsReaderProvider implement
         byte[] bytes = p.getDecodedJwsPayloadBytes();
         res.setEntityStream(new ByteArrayInputStream(bytes));
         res.getHeaders().putSingle("Content-Length", Integer.toString(bytes.length));
-        String ct = JoseUtils.checkContentType(p.getJwsHeaders().getContentType(), getDefaultMediaType());
+        String ct = JoseUtils.checkContentType(p.getJoseHeaders().getContentType(), getDefaultMediaType());
         if (ct != null) {
             res.getHeaders().putSingle("Content-Type", ct);
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsContainerRequestFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsContainerRequestFilter.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsContainerRequestFilter.java
index fbd051d..de736f0 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsContainerRequestFilter.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsContainerRequestFilter.java
@@ -48,7 +48,7 @@ public class JwsContainerRequestFilter extends AbstractJwsReaderProvider
impleme
         context.setEntityStream(new ByteArrayInputStream(bytes));
         context.getHeaders().putSingle("Content-Length", Integer.toString(bytes.length));
         
-        String ct = JoseUtils.checkContentType(p.getJwsHeaders().getContentType(), getDefaultMediaType());
+        String ct = JoseUtils.checkContentType(p.getJoseHeaders().getContentType(), getDefaultMediaType());
         if (ct != null) {
             context.getHeaders().putSingle("Content-Type", ct);
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsJwtMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsJwtMessageBodyWriter.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsJwtMessageBodyWriter.java
index e700ff7..5887c57 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsJwtMessageBodyWriter.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsJwtMessageBodyWriter.java
@@ -29,9 +29,9 @@ import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyWriter;
 
 import org.apache.cxf.rs.security.jose.JoseConstants;
+import org.apache.cxf.rs.security.jose.JoseHeaders;
 import org.apache.cxf.rs.security.jose.jws.JwsJwtCompactProducer;
 import org.apache.cxf.rs.security.jose.jws.JwsSignatureProvider;
-import org.apache.cxf.rs.security.jose.jwt.JwtHeaders;
 import org.apache.cxf.rs.security.jose.jwt.JwtToken;
 
 public class JwsJwtMessageBodyWriter  extends AbstractJwsWriterProvider 
@@ -52,7 +52,7 @@ public class JwsJwtMessageBodyWriter  extends AbstractJwsWriterProvider
                         MultivaluedMap<String, Object> headers, OutputStream os) throws
IOException,
         WebApplicationException {
         JwsJwtCompactProducer p = new JwsJwtCompactProducer(token);
-        JwtHeaders jwtHeaders = new JwtHeaders();
+        JoseHeaders jwtHeaders = new JoseHeaders();
         JwsSignatureProvider sigProvider = getInitializedSigProvider(jwtHeaders);
         jwtHeaders.setContentType(JoseConstants.TYPE_JWT);
         writeJws(p, sigProvider, os);

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsWriterInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsWriterInterceptor.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsWriterInterceptor.java
index 853230a..ddcaa56 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsWriterInterceptor.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsWriterInterceptor.java
@@ -33,14 +33,13 @@ import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.io.CachedOutputStream;
 import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.rs.security.jose.JoseConstants;
+import org.apache.cxf.rs.security.jose.JoseHeaders;
 import org.apache.cxf.rs.security.jose.JoseHeadersReaderWriter;
 import org.apache.cxf.rs.security.jose.JoseHeadersWriter;
 import org.apache.cxf.rs.security.jose.jws.JwsCompactProducer;
-import org.apache.cxf.rs.security.jose.jws.JwsHeaders;
 import org.apache.cxf.rs.security.jose.jws.JwsOutputStream;
 import org.apache.cxf.rs.security.jose.jws.JwsSignature;
 import org.apache.cxf.rs.security.jose.jws.JwsSignatureProvider;
-import org.apache.cxf.rs.security.jose.jwt.JwtHeaders;
 
 @Priority(Priorities.JWS_WRITE_PRIORITY)
 public class JwsWriterInterceptor extends AbstractJwsWriterProvider implements WriterInterceptor
{
@@ -49,7 +48,7 @@ public class JwsWriterInterceptor extends AbstractJwsWriterProvider implements
W
     private JoseHeadersWriter writer = new JoseHeadersReaderWriter();
     @Override
     public void aroundWriteTo(WriterInterceptorContext ctx) throws IOException, WebApplicationException
{
-        JwsHeaders headers = new JwsHeaders();
+        JoseHeaders headers = new JoseHeaders();
         JwsSignatureProvider sigProvider = getInitializedSigProvider(headers);
         setContentTypeIfNeeded(headers, ctx);
         ctx.setMediaType(JAXRSUtils.toMediaType(JoseConstants.MEDIA_TYPE_JOSE_JSON));
@@ -85,7 +84,7 @@ public class JwsWriterInterceptor extends AbstractJwsWriterProvider implements
W
     public void setWriter(JoseHeadersWriter writer) {
         this.writer = writer;
     }
-    private void setContentTypeIfNeeded(JwtHeaders headers, WriterInterceptorContext ctx)
{    
+    private void setContentTypeIfNeeded(JoseHeaders headers, WriterInterceptorContext ctx)
{    
         if (contentTypeRequired) {
             MediaType mt = ctx.getMediaType();
             if (mt != null 

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/AbstractJwsSignatureProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/AbstractJwsSignatureProvider.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/AbstractJwsSignatureProvider.java
index fd1a390..4bbc22a 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/AbstractJwsSignatureProvider.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/AbstractJwsSignatureProvider.java
@@ -18,6 +18,8 @@
  */
 package org.apache.cxf.rs.security.jose.jws;
 
+import org.apache.cxf.rs.security.jose.JoseHeaders;
+
 
 public abstract class AbstractJwsSignatureProvider implements JwsSignatureProvider {
     private String algorithm;
@@ -26,9 +28,9 @@ public abstract class AbstractJwsSignatureProvider implements JwsSignatureProvid
         this.algorithm = algo;
     }
     
-    protected JwsHeaders prepareHeaders(JwsHeaders headers) {
+    protected JoseHeaders prepareHeaders(JoseHeaders headers) {
         if (headers == null) {
-            headers = new JwsHeaders();
+            headers = new JoseHeaders();
         }
         String algo = headers.getAlgorithm();
         if (algo != null) {
@@ -44,11 +46,11 @@ public abstract class AbstractJwsSignatureProvider implements JwsSignatureProvid
         return algorithm;    
     }
     @Override
-    public JwsSignature createJwsSignature(JwsHeaders headers) {
+    public JwsSignature createJwsSignature(JoseHeaders headers) {
         return doCreateJwsSignature(prepareHeaders(headers));
     }
     
-    protected abstract JwsSignature doCreateJwsSignature(JwsHeaders headers);
+    protected abstract JwsSignature doCreateJwsSignature(JoseHeaders headers);
     
     protected void checkAlgorithm(String algo) {
         if (algo == null) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/HmacJwsSignatureProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/HmacJwsSignatureProvider.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/HmacJwsSignatureProvider.java
index 3808d4e..81db7d6 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/HmacJwsSignatureProvider.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/HmacJwsSignatureProvider.java
@@ -25,6 +25,7 @@ import javax.crypto.Mac;
 import org.apache.cxf.common.util.Base64Exception;
 import org.apache.cxf.common.util.Base64UrlUtility;
 import org.apache.cxf.common.util.crypto.HmacUtils;
+import org.apache.cxf.rs.security.jose.JoseHeaders;
 import org.apache.cxf.rs.security.jose.jwa.Algorithm;
 
 public class HmacJwsSignatureProvider extends AbstractJwsSignatureProvider {
@@ -48,7 +49,7 @@ public class HmacJwsSignatureProvider extends AbstractJwsSignatureProvider
{
         }
     }
     
-    protected JwsSignature doCreateJwsSignature(JwsHeaders headers) {
+    protected JwsSignature doCreateJwsSignature(JoseHeaders headers) {
         final Mac mac = HmacUtils.getInitializedMac(key, Algorithm.toJavaName(headers.getAlgorithm()),
                                                     hmacSpec);
         return new JwsSignature() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/HmacJwsSignatureVerifier.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/HmacJwsSignatureVerifier.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/HmacJwsSignatureVerifier.java
index 4ad9c27..e6ac50d 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/HmacJwsSignatureVerifier.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/HmacJwsSignatureVerifier.java
@@ -24,8 +24,8 @@ import java.util.Arrays;
 import org.apache.cxf.common.util.Base64Exception;
 import org.apache.cxf.common.util.Base64UrlUtility;
 import org.apache.cxf.common.util.crypto.HmacUtils;
+import org.apache.cxf.rs.security.jose.JoseHeaders;
 import org.apache.cxf.rs.security.jose.jwa.Algorithm;
-import org.apache.cxf.rs.security.jose.jwt.JwtHeaders;
 
 public class HmacJwsSignatureVerifier implements JwsSignatureVerifier {
     private byte[] key;
@@ -56,12 +56,12 @@ public class HmacJwsSignatureVerifier implements JwsSignatureVerifier
{
     }
     
     @Override
-    public boolean verify(JwtHeaders headers, String unsignedText, byte[] signature) {
+    public boolean verify(JoseHeaders headers, String unsignedText, byte[] signature) {
         byte[] expected = computeMac(headers, unsignedText);
         return Arrays.equals(expected, signature);
     }
     
-    private byte[] computeMac(JwtHeaders headers, String text) {
+    private byte[] computeMac(JoseHeaders headers, String text) {
         return HmacUtils.computeHmac(key, 
                                      Algorithm.toJavaName(checkAlgorithm(headers.getAlgorithm())),
                                      hmacSpec,

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsCompactConsumer.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsCompactConsumer.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsCompactConsumer.java
index 4ae7254..1d37dd7 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsCompactConsumer.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsCompactConsumer.java
@@ -77,16 +77,16 @@ public class JwsCompactConsumer {
     public byte[] getDecodedSignature() {
         return encodedSignature.isEmpty() ? new byte[]{} : decode(encodedSignature);
     }
-    public JwsHeaders getJwsHeaders() {
+    public JoseHeaders getJoseHeaders() {
         JoseHeaders joseHeaders = reader.fromJsonHeaders(headersJson);
         if (joseHeaders.getHeaderUpdateCount() != null) { 
             throw new SecurityException();
         }
-        return new JwsHeaders(joseHeaders);
+        return joseHeaders;
     }
     public boolean verifySignatureWith(JwsSignatureVerifier validator) {
         try {
-            if (validator.verify(getJwsHeaders(), getUnsignedEncodedPayload(), getDecodedSignature()))
{
+            if (validator.verify(getJoseHeaders(), getUnsignedEncodedPayload(), getDecodedSignature()))
{
                 return true;
             }
         } catch (SecurityException ex) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsCompactProducer.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsCompactProducer.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsCompactProducer.java
index 981963e..1f4c39a 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsCompactProducer.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsCompactProducer.java
@@ -21,13 +21,14 @@ package org.apache.cxf.rs.security.jose.jws;
 import org.apache.cxf.common.util.Base64UrlUtility;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.rs.security.jose.JoseConstants;
+import org.apache.cxf.rs.security.jose.JoseHeaders;
 import org.apache.cxf.rs.security.jose.JoseHeadersReaderWriter;
 import org.apache.cxf.rs.security.jose.JoseHeadersWriter;
 import org.apache.cxf.rs.security.jose.jwk.JsonWebKey;
 
 public class JwsCompactProducer {
     private JoseHeadersWriter writer = new JoseHeadersReaderWriter();
-    private JwsHeaders headers;
+    private JoseHeaders headers;
     private String plainJwsPayload;
     private String signature;
     private String plainRep;
@@ -35,26 +36,26 @@ public class JwsCompactProducer {
     public JwsCompactProducer(String plainJwsPayload) {
         this(null, null, plainJwsPayload);
     }
-    public JwsCompactProducer(JwsHeaders headers, String plainJwsPayload) {
+    public JwsCompactProducer(JoseHeaders headers, String plainJwsPayload) {
         this(headers, null, plainJwsPayload);
     }
-    public JwsCompactProducer(JwsHeaders headers, JoseHeadersWriter w, String plainJwsPayload)
{
+    public JwsCompactProducer(JoseHeaders headers, JoseHeadersWriter w, String plainJwsPayload)
{
         this.headers = headers;
         if (w != null) {
             this.writer = w;
         }
         this.plainJwsPayload = plainJwsPayload;
     }
-    public JwsHeaders getHeaders() {
+    public JoseHeaders getJoseHeaders() {
         if (headers == null) {
-            headers = new JwsHeaders();
+            headers = new JoseHeaders();
         }
         return headers;
     }
     public String getUnsignedEncodedJws() {
         checkAlgorithm();
         if (plainRep == null) {
-            plainRep = Base64UrlUtility.encode(writer.headersToJson(getHeaders())) 
+            plainRep = Base64UrlUtility.encode(writer.headersToJson(getJoseHeaders())) 
                 + "." 
                 + Base64UrlUtility.encode(plainJwsPayload);
         }
@@ -75,7 +76,7 @@ public class JwsCompactProducer {
     }
     
     public String signWith(JwsSignatureProvider signer) { 
-        JwsSignature worker = signer.createJwsSignature(getHeaders());
+        JwsSignature worker = signer.createJwsSignature(getJoseHeaders());
         
         byte[] bytes = StringUtils.toBytesUTF8(getUnsignedEncodedJws());
         worker.update(bytes, 0, bytes.length);
@@ -101,7 +102,7 @@ public class JwsCompactProducer {
         return JoseConstants.PLAIN_TEXT_ALGO.equals(getAlgorithm());
     }
     private String getAlgorithm() {
-        return getHeaders().getAlgorithm();
+        return getJoseHeaders().getAlgorithm();
     }
     private void checkAlgorithm() {
         if (getAlgorithm() == null) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsHeaders.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsHeaders.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsHeaders.java
deleted file mode 100644
index 8ef08a6..0000000
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsHeaders.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.rs.security.jose.jws;
-
-import java.util.Map;
-
-import org.apache.cxf.rs.security.jose.JoseHeaders;
-import org.apache.cxf.rs.security.jose.jwt.JwtHeaders;
-
-public class JwsHeaders extends JwtHeaders {
-    public JwsHeaders() {
-    }
-    
-    public JwsHeaders(JoseHeaders headers) {
-        super(headers.asMap());
-    }
-    
-    public JwsHeaders(Map<String, Object> values) {
-        super(values);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJwtCompactProducer.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJwtCompactProducer.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJwtCompactProducer.java
index 19c194d..bc3cc22 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJwtCompactProducer.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsJwtCompactProducer.java
@@ -17,13 +17,13 @@
  * under the License.
  */
 package org.apache.cxf.rs.security.jose.jws;
-
+import org.apache.cxf.rs.security.jose.JoseHeaders;
 import org.apache.cxf.rs.security.jose.jwt.JwtClaims;
-import org.apache.cxf.rs.security.jose.jwt.JwtHeaders;
 import org.apache.cxf.rs.security.jose.jwt.JwtToken;
 import org.apache.cxf.rs.security.jose.jwt.JwtTokenReaderWriter;
 import org.apache.cxf.rs.security.jose.jwt.JwtTokenWriter;
 
+
 public class JwsJwtCompactProducer extends JwsCompactProducer {
     
     public JwsJwtCompactProducer(JwtToken token) {
@@ -32,14 +32,14 @@ public class JwsJwtCompactProducer extends JwsCompactProducer {
     public JwsJwtCompactProducer(JwtClaims claims) {
         this(new JwtToken(null, claims), null);
     }
-    public JwsJwtCompactProducer(JwtHeaders headers, JwtClaims claims) {
+    public JwsJwtCompactProducer(JoseHeaders headers, JwtClaims claims) {
         this(headers, claims, null);
     }
-    public JwsJwtCompactProducer(JwtHeaders headers, JwtClaims claims, JwtTokenWriter w)
{
+    public JwsJwtCompactProducer(JoseHeaders headers, JwtClaims claims, JwtTokenWriter w)
{
         this(new JwtToken(headers, claims), w);
     }
     public JwsJwtCompactProducer(JwtToken token, JwtTokenWriter w) {
-        super(new JwsHeaders(token.getHeaders().asMap()), w, serializeClaims(token.getClaims(),
w));
+        super(token.getHeaders(), w, serializeClaims(token.getClaims(), w));
     }
     
     private static String serializeClaims(JwtClaims claims, JwtTokenWriter writer) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsSignatureProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsSignatureProvider.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsSignatureProvider.java
index 010c62e..7dd9a0a 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsSignatureProvider.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsSignatureProvider.java
@@ -18,8 +18,10 @@
  */
 package org.apache.cxf.rs.security.jose.jws;
 
+import org.apache.cxf.rs.security.jose.JoseHeaders;
+
 
 public interface JwsSignatureProvider {
     String getAlgorithm();
-    JwsSignature createJwsSignature(JwsHeaders headers);
+    JwsSignature createJwsSignature(JoseHeaders headers);
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsSignatureVerifier.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsSignatureVerifier.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsSignatureVerifier.java
index ea4a01f..82e4f6b 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsSignatureVerifier.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsSignatureVerifier.java
@@ -18,8 +18,8 @@
  */
 package org.apache.cxf.rs.security.jose.jws;
 
-import org.apache.cxf.rs.security.jose.jwt.JwtHeaders;
+import org.apache.cxf.rs.security.jose.JoseHeaders;
 
 public interface JwsSignatureVerifier {
-    boolean verify(JwtHeaders headers, String unsignedText, byte[] signature);
+    boolean verify(JoseHeaders headers, String unsignedText, byte[] signature);
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/PrivateKeyJwsSignatureProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/PrivateKeyJwsSignatureProvider.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/PrivateKeyJwsSignatureProvider.java
index c2f5a6a..784248d 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/PrivateKeyJwsSignatureProvider.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/PrivateKeyJwsSignatureProvider.java
@@ -25,6 +25,7 @@ import java.security.SignatureException;
 import java.security.spec.AlgorithmParameterSpec;
 
 import org.apache.cxf.common.util.crypto.CryptoUtils;
+import org.apache.cxf.rs.security.jose.JoseHeaders;
 import org.apache.cxf.rs.security.jose.jwa.Algorithm;
 
 public class PrivateKeyJwsSignatureProvider extends AbstractJwsSignatureProvider {
@@ -45,7 +46,7 @@ public class PrivateKeyJwsSignatureProvider extends AbstractJwsSignatureProvider
         this.random = random;
         this.signatureSpec = spec;
     }
-    protected JwsSignature doCreateJwsSignature(JwsHeaders headers) {
+    protected JwsSignature doCreateJwsSignature(JoseHeaders headers) {
         final Signature s = CryptoUtils.getSignature(key, 
                                                      Algorithm.toJavaName(headers.getAlgorithm()),
                                                      random,

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/PublicKeyJwsSignatureVerifier.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/PublicKeyJwsSignatureVerifier.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/PublicKeyJwsSignatureVerifier.java
index ee5da26..9f910e8 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/PublicKeyJwsSignatureVerifier.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/PublicKeyJwsSignatureVerifier.java
@@ -23,8 +23,8 @@ import java.security.spec.AlgorithmParameterSpec;
 
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.common.util.crypto.CryptoUtils;
+import org.apache.cxf.rs.security.jose.JoseHeaders;
 import org.apache.cxf.rs.security.jose.jwa.Algorithm;
-import org.apache.cxf.rs.security.jose.jwt.JwtHeaders;
 
 public class PublicKeyJwsSignatureVerifier implements JwsSignatureVerifier {
     private PublicKey key;
@@ -43,7 +43,7 @@ public class PublicKeyJwsSignatureVerifier implements JwsSignatureVerifier
{
         this.supportedAlgo = supportedAlgo;
     }
     @Override
-    public boolean verify(JwtHeaders headers, String unsignedText, byte[] signature) {
+    public boolean verify(JoseHeaders headers, String unsignedText, byte[] signature) {
         try {
             return CryptoUtils.verifySignature(StringUtils.toBytesUTF8(unsignedText), 
                                                signature, 

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtHeaders.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtHeaders.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtHeaders.java
deleted file mode 100644
index e4a1891..0000000
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtHeaders.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.cxf.rs.security.jose.jwt;
-
-import java.util.Map;
-
-import org.apache.cxf.rs.security.jose.JoseConstants;
-import org.apache.cxf.rs.security.jose.JoseHeaders;
-import org.apache.cxf.rs.security.jose.jwa.Algorithm;
-
-public class JwtHeaders extends JoseHeaders {
-    
-    public JwtHeaders() {
-    }
-    
-    public JwtHeaders(String algorithm) {
-        init(algorithm);
-    }
-    
-    public JwtHeaders(Algorithm algo) {
-        init(algo.getJwtName());
-    }
-    
-    public JwtHeaders(Map<String, Object> values) {
-        super(values);
-    }
-    
-    public JwtHeaders(JoseHeaders headers) {
-        super(headers.asMap());
-    }
-    
-    private void init(String algo) {
-        setType(JoseConstants.TYPE_JWT);
-        setAlgorithm(algo);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtToken.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtToken.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtToken.java
index 630813c..e22e0ef 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtToken.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtToken.java
@@ -18,16 +18,18 @@
  */
 package org.apache.cxf.rs.security.jose.jwt;
 
+import org.apache.cxf.rs.security.jose.JoseHeaders;
+
 
 
 public class JwtToken {
-    private JwtHeaders headers;
+    private JoseHeaders headers;
     private JwtClaims claims;
-    public JwtToken(JwtHeaders headers, JwtClaims claims) {
+    public JwtToken(JoseHeaders headers, JwtClaims claims) {
         this.headers = headers;
         this.claims = claims;
     }
-    public JwtHeaders getHeaders() {
+    public JoseHeaders getHeaders() {
         return headers;
     }
     public JwtClaims getClaims() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtTokenReaderWriter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtTokenReaderWriter.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtTokenReaderWriter.java
index 15a5572..344d8f1 100644
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtTokenReaderWriter.java
+++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtTokenReaderWriter.java
@@ -22,6 +22,7 @@ import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Set;
 
+import org.apache.cxf.rs.security.jose.JoseHeaders;
 import org.apache.cxf.rs.security.jose.JoseHeadersReaderWriter;
 
 
@@ -54,7 +55,7 @@ public class JwtTokenReaderWriter extends JoseHeadersReaderWriter
     }
     
     private JwtToken fromJson(String headersJson, String claimsJson) {
-        JwtHeaders headers = fromJsonHeaders(headersJson);
+        JoseHeaders headers = fromJsonHeaders(headersJson);
         JwtClaims claims = fromJsonClaims(claimsJson);
         return new JwtToken(headers, claims);
     }
@@ -65,11 +66,6 @@ public class JwtTokenReaderWriter extends JoseHeadersReaderWriter
     }
     
     @Override
-    public JwtHeaders fromJsonHeaders(String jsonHeaders) {
-        return new JwtHeaders(super.fromJsonHeaders(jsonHeaders)); 
-    }
-    
-    @Override
     protected Object readPrimitiveValue(String name, String json, int from, int to) {
         Object value = super.readPrimitiveValue(name, json, from, to);
         if (DATE_PROPERTIES.contains(name)) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/jose/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsCompactReaderWriterTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsCompactReaderWriterTest.java
b/rt/rs/security/jose/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsCompactReaderWriterTest.java
index bf868bc..e37b854 100644
--- a/rt/rs/security/jose/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsCompactReaderWriterTest.java
+++ b/rt/rs/security/jose/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsCompactReaderWriterTest.java
@@ -29,10 +29,10 @@ import java.util.Map;
 
 import org.apache.cxf.common.util.crypto.CryptoUtils;
 import org.apache.cxf.rs.security.jose.JoseConstants;
+import org.apache.cxf.rs.security.jose.JoseHeaders;
 import org.apache.cxf.rs.security.jose.jwa.Algorithm;
 import org.apache.cxf.rs.security.jose.jwk.JsonWebKey;
 import org.apache.cxf.rs.security.jose.jwt.JwtClaims;
-import org.apache.cxf.rs.security.jose.jwt.JwtHeaders;
 import org.apache.cxf.rs.security.jose.jwt.JwtToken;
 import org.apache.cxf.rs.security.jose.jwt.JwtTokenReaderWriter;
 import org.apache.cxf.rs.security.jose.jwt.JwtTokenWriter;
@@ -92,7 +92,9 @@ public class JwsCompactReaderWriterTest extends Assert {
         "x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0";
     @Test
     public void testWriteJwsSignedByMacSpecExample() throws Exception {
-        JwtHeaders headers = new JwtHeaders(Algorithm.HmacSHA256.getJwtName());
+        JoseHeaders headers = new JoseHeaders();
+        headers.setType(JoseConstants.TYPE_JWT);
+        headers.setAlgorithm(Algorithm.HmacSHA256.getJwtName());
         JwsCompactProducer jws = initSpecJwtTokenWriter(headers);
         jws.signWith(new HmacJwsSignatureProvider(ENCODED_MAC_KEY, Algorithm.HmacSHA256.getJwtName()));
         
@@ -102,7 +104,9 @@ public class JwsCompactReaderWriterTest extends Assert {
     
     @Test
     public void testWriteReadJwsUnsigned() throws Exception {
-        JwtHeaders headers = new JwtHeaders(JoseConstants.PLAIN_TEXT_ALGO);
+        JoseHeaders headers = new JoseHeaders();
+        headers.setType(JoseConstants.TYPE_JWT);
+        headers.setAlgorithm(JoseConstants.PLAIN_TEXT_ALGO);
         
         JwtClaims claims = new JwtClaims();
         claims.setIssuer("https://jwt-idp.example.com");
@@ -127,7 +131,7 @@ public class JwsCompactReaderWriterTest extends Assert {
         JwsJwtCompactConsumer jws = new JwsJwtCompactConsumer(ENCODED_TOKEN_SIGNED_BY_MAC);
         assertTrue(jws.verifySignatureWith(new HmacJwsSignatureVerifier(ENCODED_MAC_KEY)));
         JwtToken token = jws.getJwtToken();
-        JwtHeaders headers = token.getHeaders();
+        JoseHeaders headers = token.getHeaders();
         assertEquals(JoseConstants.TYPE_JWT, headers.getType());
         assertEquals(Algorithm.HmacSHA256.getJwtName(), headers.getAlgorithm());
         validateSpecClaim(token.getClaims());
@@ -152,8 +156,9 @@ public class JwsCompactReaderWriterTest extends Assert {
     }
     
     private void doTestWriteJwsWithJwkSignedByMac(Object jsonWebKey) throws Exception {
-        JwtHeaders headers = new JwtHeaders(Algorithm.HmacSHA256.getJwtName());
-        
+        JoseHeaders headers = new JoseHeaders();
+        headers.setType(JoseConstants.TYPE_JWT);
+        headers.setAlgorithm(Algorithm.HmacSHA256.getJwtName());
         headers.setHeader(JoseConstants.HEADER_JSON_WEB_KEY, jsonWebKey);
         
         JwtClaims claims = new JwtClaims();
@@ -173,7 +178,7 @@ public class JwsCompactReaderWriterTest extends Assert {
         JwsJwtCompactConsumer jws = new JwsJwtCompactConsumer(ENCODED_TOKEN_WITH_JSON_KEY_SIGNED_BY_MAC);
         assertTrue(jws.verifySignatureWith(new HmacJwsSignatureVerifier(ENCODED_MAC_KEY)));
         JwtToken token = jws.getJwtToken();
-        JwtHeaders headers = token.getHeaders();
+        JoseHeaders headers = token.getHeaders();
         assertEquals(JoseConstants.TYPE_JWT, headers.getType());
         assertEquals(Algorithm.HmacSHA256.getJwtName(), headers.getAlgorithm());
         
@@ -195,7 +200,7 @@ public class JwsCompactReaderWriterTest extends Assert {
     
     @Test
     public void testWriteJwsSignedByPrivateKey() throws Exception {
-        JwtHeaders headers = new JwtHeaders();
+        JoseHeaders headers = new JoseHeaders();
         headers.setAlgorithm(Algorithm.SHA256withRSA.getJwtName());
         JwsCompactProducer jws = initSpecJwtTokenWriter(headers);
         PrivateKey key = CryptoUtils.getRSAPrivateKey(RSA_MODULUS_ENCODED, RSA_PRIVATE_EXPONENT_ENCODED);
@@ -206,7 +211,7 @@ public class JwsCompactReaderWriterTest extends Assert {
     
     @Test
     public void testWriteReadJwsSignedByESPrivateKey() throws Exception {
-        JwtHeaders headers = new JwtHeaders();
+        JoseHeaders headers = new JoseHeaders();
         headers.setAlgorithm(Algorithm.SHA256withECDSA.getJwtName());
         JwsCompactProducer jws = initSpecJwtTokenWriter(headers);
         ECPrivateKey privateKey = CryptoUtils.getECPrivateKey(JsonWebKey.EC_CURVE_P256,
@@ -220,7 +225,7 @@ public class JwsCompactReaderWriterTest extends Assert {
         JwsJwtCompactConsumer jwsConsumer = new JwsJwtCompactConsumer(signedJws);
         assertTrue(jwsConsumer.verifySignatureWith(new EcDsaJwsSignatureVerifier(publicKey)));
         JwtToken token = jwsConsumer.getJwtToken();
-        JwtHeaders headersReceived = token.getHeaders();
+        JoseHeaders headersReceived = token.getHeaders();
         assertEquals(Algorithm.SHA256withECDSA.getJwtName(), headersReceived.getAlgorithm());
         validateSpecClaim(token.getClaims());
     }
@@ -231,12 +236,12 @@ public class JwsCompactReaderWriterTest extends Assert {
         RSAPublicKey key = CryptoUtils.getRSAPublicKey(RSA_MODULUS_ENCODED, RSA_PUBLIC_EXPONENT_ENCODED);
         assertTrue(jws.verifySignatureWith(new PublicKeyJwsSignatureVerifier(key)));
         JwtToken token = jws.getJwtToken();
-        JwtHeaders headers = token.getHeaders();
+        JoseHeaders headers = token.getHeaders();
         assertEquals(Algorithm.SHA256withRSA.getJwtName(), headers.getAlgorithm());
         validateSpecClaim(token.getClaims());
     }
     
-    private JwsCompactProducer initSpecJwtTokenWriter(JwtHeaders headers) throws Exception
{
+    private JwsCompactProducer initSpecJwtTokenWriter(JoseHeaders headers) throws Exception
{
         
         JwtClaims claims = new JwtClaims();
         claims.setIssuer("joe");

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/oauth-parent/oauth2-jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/grant/AbstractJwtHandler.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2-jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/grant/AbstractJwtHandler.java
b/rt/rs/security/oauth-parent/oauth2-jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/grant/AbstractJwtHandler.java
index dbc8ffe..ff163b0 100644
--- a/rt/rs/security/oauth-parent/oauth2-jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/grant/AbstractJwtHandler.java
+++ b/rt/rs/security/oauth-parent/oauth2-jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/grant/AbstractJwtHandler.java
@@ -21,9 +21,9 @@ package org.apache.cxf.rs.security.jose.jwt.grant;
 import java.util.List;
 import java.util.Set;
 
+import org.apache.cxf.rs.security.jose.JoseHeaders;
 import org.apache.cxf.rs.security.jose.jws.JwsSignatureVerifier;
 import org.apache.cxf.rs.security.jose.jwt.JwtClaims;
-import org.apache.cxf.rs.security.jose.jwt.JwtHeaders;
 import org.apache.cxf.rs.security.oauth2.common.Client;
 import org.apache.cxf.rs.security.oauth2.grants.AbstractGrantHandler;
 import org.apache.cxf.rs.security.oauth2.provider.OAuthServiceException;
@@ -41,7 +41,7 @@ public abstract class AbstractJwtHandler extends AbstractGrantHandler {
         super(grants);
     }
     
-    protected void validateSignature(JwtHeaders headers, String unsignedText, byte[] signature)
{
+    protected void validateSignature(JoseHeaders headers, String unsignedText, byte[] signature)
{
         if (jwsVefifier.verify(headers, unsignedText, signature)) {    
             throw new OAuthServiceException(OAuthConstants.INVALID_GRANT);
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/61f520d3/rt/rs/security/oauth-parent/oauth2-jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/token/JwtAccessTokenUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2-jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/token/JwtAccessTokenUtils.java
b/rt/rs/security/oauth-parent/oauth2-jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/token/JwtAccessTokenUtils.java
index 1372adf..594d777 100644
--- a/rt/rs/security/oauth-parent/oauth2-jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/token/JwtAccessTokenUtils.java
+++ b/rt/rs/security/oauth-parent/oauth2-jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/token/JwtAccessTokenUtils.java
@@ -20,6 +20,7 @@ package org.apache.cxf.rs.security.jose.jwt.token;
 
 import javax.crypto.SecretKey;
 
+import org.apache.cxf.rs.security.jose.JoseHeaders;
 import org.apache.cxf.rs.security.jose.jwa.Algorithm;
 import org.apache.cxf.rs.security.jose.jwe.AesGcmContentDecryptionAlgorithm;
 import org.apache.cxf.rs.security.jose.jwe.AesGcmContentEncryptionAlgorithm;
@@ -28,7 +29,6 @@ import org.apache.cxf.rs.security.jose.jwe.DirectKeyJweDecryption;
 import org.apache.cxf.rs.security.jose.jwe.DirectKeyJweEncryption;
 import org.apache.cxf.rs.security.jose.jwe.JweDecryptionProvider;
 import org.apache.cxf.rs.security.jose.jwe.JweEncryptionProvider;
-import org.apache.cxf.rs.security.jose.jws.JwsHeaders;
 import org.apache.cxf.rs.security.jose.jws.JwsJwtCompactConsumer;
 import org.apache.cxf.rs.security.jose.jws.JwsJwtCompactProducer;
 import org.apache.cxf.rs.security.jose.jws.JwsSignature;
@@ -94,7 +94,7 @@ public final class JwtAccessTokenUtils {
         }
 
         @Override
-        public JwsSignature createJwsSignature(JwsHeaders headers) {
+        public JwsSignature createJwsSignature(JoseHeaders headers) {
             return new NoneJwsSignature();
         }
         


Mime
View raw message