cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: [CXF-5954] Minimizing JWK Set reader/writer interface
Date Wed, 03 Sep 2014 20:55:37 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 07170628e -> c5683a6a4


[CXF-5954] Minimizing JWK Set reader/writer interface


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

Branch: refs/heads/master
Commit: c5683a6a4f1111ea4936993bce175da6f81a0bee
Parents: 0717062
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Wed Sep 3 21:55:21 2014 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Wed Sep 3 21:55:21 2014 +0100

----------------------------------------------------------------------
 .../oauth2/jwk/DefaultJwkSetReaderWriter.java         | 14 ++------------
 .../rs/security/oauth2/jwk/JwkSetReaderWriter.java    |  6 ++----
 .../cxf/rs/security/oauth2/jwk/JsonWebKeyTest.java    |  2 +-
 3 files changed, 5 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/c5683a6a/rt/rs/security/oauth-parent/oauth2-jwt/src/main/java/org/apache/cxf/rs/security/oauth2/jwk/DefaultJwkSetReaderWriter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2-jwt/src/main/java/org/apache/cxf/rs/security/oauth2/jwk/DefaultJwkSetReaderWriter.java
b/rt/rs/security/oauth-parent/oauth2-jwt/src/main/java/org/apache/cxf/rs/security/oauth2/jwk/DefaultJwkSetReaderWriter.java
index 128e932..15492c2 100644
--- a/rt/rs/security/oauth-parent/oauth2-jwt/src/main/java/org/apache/cxf/rs/security/oauth2/jwk/DefaultJwkSetReaderWriter.java
+++ b/rt/rs/security/oauth-parent/oauth2-jwt/src/main/java/org/apache/cxf/rs/security/oauth2/jwk/DefaultJwkSetReaderWriter.java
@@ -26,21 +26,11 @@ import org.apache.cxf.rs.security.oauth2.jwt.AbstractJwtObjectReaderWriter;
 public class DefaultJwkSetReaderWriter extends AbstractJwtObjectReaderWriter
     implements JwkSetReaderWriter {
     @Override
-    public String jwkToJson(JsonWebKey jwk) {
-        return toJson(jwk);
-    }
-    @Override
-    public String jwksToJson(JsonWebKeys jwks) {
+    public String jwkSetToJson(JsonWebKeys jwks) {
         return toJson(jwks);
     }
     @Override
-    public JsonWebKey jsonToJwk(String jwkJson) {
-        JsonWebKey jwk = new JsonWebKey();
-        fromJsonInternal(jwk, jwkJson);
-        return jwk;
-    }
-    @Override
-    public JsonWebKeys jsonToJwks(String jwksJson) {
+    public JsonWebKeys jsonToJwkSet(String jwksJson) {
         JsonWebKeys jwks = new JsonWebKeys();
         fromJsonInternal(jwks, jwksJson);
         return jwks;

http://git-wip-us.apache.org/repos/asf/cxf/blob/c5683a6a/rt/rs/security/oauth-parent/oauth2-jwt/src/main/java/org/apache/cxf/rs/security/oauth2/jwk/JwkSetReaderWriter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2-jwt/src/main/java/org/apache/cxf/rs/security/oauth2/jwk/JwkSetReaderWriter.java
b/rt/rs/security/oauth-parent/oauth2-jwt/src/main/java/org/apache/cxf/rs/security/oauth2/jwk/JwkSetReaderWriter.java
index b412b72..05bada0 100644
--- a/rt/rs/security/oauth-parent/oauth2-jwt/src/main/java/org/apache/cxf/rs/security/oauth2/jwk/JwkSetReaderWriter.java
+++ b/rt/rs/security/oauth-parent/oauth2-jwt/src/main/java/org/apache/cxf/rs/security/oauth2/jwk/JwkSetReaderWriter.java
@@ -20,8 +20,6 @@ package org.apache.cxf.rs.security.oauth2.jwk;
 
 
 public interface JwkSetReaderWriter {
-    String jwkToJson(JsonWebKey jwk);
-    String jwksToJson(JsonWebKeys jwks);
-    JsonWebKey jsonToJwk(String jwkJson);
-    JsonWebKeys jsonToJwks(String jwksJson);
+    String jwkSetToJson(JsonWebKeys jwkSet);
+    JsonWebKeys jsonToJwkSet(String jwkSetJson);
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/c5683a6a/rt/rs/security/oauth-parent/oauth2-jwt/src/test/java/org/apache/cxf/rs/security/oauth2/jwk/JsonWebKeyTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2-jwt/src/test/java/org/apache/cxf/rs/security/oauth2/jwk/JsonWebKeyTest.java
b/rt/rs/security/oauth-parent/oauth2-jwt/src/test/java/org/apache/cxf/rs/security/oauth2/jwk/JsonWebKeyTest.java
index e52fbd1..dd06e3c 100644
--- a/rt/rs/security/oauth-parent/oauth2-jwt/src/test/java/org/apache/cxf/rs/security/oauth2/jwk/JsonWebKeyTest.java
+++ b/rt/rs/security/oauth-parent/oauth2-jwt/src/test/java/org/apache/cxf/rs/security/oauth2/jwk/JsonWebKeyTest.java
@@ -166,6 +166,6 @@ public class JsonWebKeyTest extends Assert {
         InputStream is = JsonWebKeyTest.class.getResourceAsStream(fileName);
         String s = IOUtils.readStringFromStream(is);
         JwkSetReaderWriter reader = new DefaultJwkSetReaderWriter();
-        return reader.jsonToJwks(s);
+        return reader.jsonToJwkSet(s);
     }
 }


Mime
View raw message