cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Removing JWT MBR/MBW for now
Date Sun, 16 Nov 2014 21:45:14 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 335c7bad2 -> da6b2ee8c


Removing JWT MBR/MBW for now


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

Branch: refs/heads/master
Commit: da6b2ee8c624a4362a91bd2f7ce91e42b3da1cb5
Parents: 335c7ba
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Sun Nov 16 22:44:59 2014 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Sun Nov 16 22:44:59 2014 +0100

----------------------------------------------------------------------
 .../jose/jaxrs/JwsJwtMessageBodyReader.java     | 54 ------------------
 .../jose/jaxrs/JwsJwtMessageBodyWriter.java     | 60 --------------------
 2 files changed, 114 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/da6b2ee8/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsJwtMessageBodyReader.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsJwtMessageBodyReader.java
b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsJwtMessageBodyReader.java
deleted file mode 100644
index b1c1f53..0000000
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsJwtMessageBodyReader.java
+++ /dev/null
@@ -1,54 +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.jaxrs;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.ext.MessageBodyReader;
-
-import org.apache.cxf.helpers.IOUtils;
-import org.apache.cxf.rs.security.jose.jws.JwsJwtCompactConsumer;
-import org.apache.cxf.rs.security.jose.jws.JwsSignatureVerifier;
-import org.apache.cxf.rs.security.jose.jwt.JwtToken;
-
-public class JwsJwtMessageBodyReader extends AbstractJwsReaderProvider 
-    implements MessageBodyReader<JwtToken> {
-    
-    @Override
-    public boolean isReadable(Class<?> cls, Type type, Annotation[] anns, MediaType
mt) {
-        return cls == JwtToken.class;
-    }
-
-    @Override
-    public JwtToken readFrom(Class<JwtToken> cls, Type t, Annotation[] anns, MediaType
mt,
-                             MultivaluedMap<String, String> headers, InputStream is)
throws IOException,
-        WebApplicationException {
-        JwsSignatureVerifier theSigVerifier = getInitializedSigVerifier();
-        JwsJwtCompactConsumer p = new JwsJwtCompactConsumer(IOUtils.readStringFromStream(is));
-        p.verifySignatureWith(theSigVerifier);
-        return p.getJwtToken();
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/da6b2ee8/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
deleted file mode 100644
index 5887c57..0000000
--- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsJwtMessageBodyWriter.java
+++ /dev/null
@@ -1,60 +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.jaxrs;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.MediaType;
-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.JwtToken;
-
-public class JwsJwtMessageBodyWriter  extends AbstractJwsWriterProvider 
-    implements MessageBodyWriter<JwtToken> {
-    
-    @Override
-    public long getSize(JwtToken token, Class<?> cls, Type type, Annotation[] anns,
MediaType mt) {
-        return -1;
-    }
-
-    @Override
-    public boolean isWriteable(Class<?> cls, Type type, Annotation[] anns, MediaType
mt) {
-        return cls == JwtToken.class;
-    }
-
-    @Override
-    public void writeTo(JwtToken token, Class<?> cls, Type type, Annotation[] anns,
MediaType mt,
-                        MultivaluedMap<String, Object> headers, OutputStream os) throws
IOException,
-        WebApplicationException {
-        JwsJwtCompactProducer p = new JwsJwtCompactProducer(token);
-        JoseHeaders jwtHeaders = new JoseHeaders();
-        JwsSignatureProvider sigProvider = getInitializedSigProvider(jwtHeaders);
-        jwtHeaders.setContentType(JoseConstants.TYPE_JWT);
-        writeJws(p, sigProvider, os);
-    }
-}


Mime
View raw message