cxf git commit: If a named principal is available then keep the existing sec context

2015-12-01 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes bd26eadf9 -> ed682ac7e


If a named principal is available then keep the existing sec context


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

Branch: refs/heads/3.0.x-fixes
Commit: ed682ac7e4d37c59cf79c8028f2a55471cdbbc93
Parents: bd26ead
Author: Sergey Beryozkin 
Authored: Tue Dec 1 21:15:16 2015 +
Committer: Sergey Beryozkin 
Committed: Tue Dec 1 21:17:16 2015 +

--
 .../rs/security/jose/jaxrs/JwsContainerRequestFilter.java   | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/ed682ac7/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsContainerRequestFilter.java
--
diff --git 
a/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsContainerRequestFilter.java
 
b/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsContainerRequestFilter.java
index 003e674..44ba01a 100644
--- 
a/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsContainerRequestFilter.java
+++ 
b/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsContainerRequestFilter.java
@@ -60,9 +60,12 @@ public class JwsContainerRequestFilter extends 
AbstractJwsReaderProvider impleme
 context.getHeaders().putSingle("Content-Type", ct);
 }
 
-SecurityContext securityContext = 
configureSecurityContext(theSigVerifier);
-if (securityContext != null) {
-JAXRSUtils.getCurrentMessage().put(SecurityContext.class, 
securityContext);
+Principal currentPrincipal = 
context.getSecurityContext().getUserPrincipal(); 
+if (currentPrincipal != null && currentPrincipal.getName() != null) {
+SecurityContext securityContext = 
configureSecurityContext(theSigVerifier);
+if (securityContext != null) {
+JAXRSUtils.getCurrentMessage().put(SecurityContext.class, 
securityContext);
+}
 }
 }
 



cxf git commit: If a named principal is available then keep the existing sec context

2015-12-01 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/master f33bd39ce -> 0c8b46b4b


If a named principal is available then keep the existing sec context


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

Branch: refs/heads/master
Commit: 0c8b46b4b9e19e987a65513dc5ce8e8e351be58a
Parents: f33bd39
Author: Sergey Beryozkin 
Authored: Tue Dec 1 21:15:16 2015 +
Committer: Sergey Beryozkin 
Committed: Tue Dec 1 21:15:16 2015 +

--
 .../rs/security/jose/jaxrs/JwsContainerRequestFilter.java   | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/0c8b46b4/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsContainerRequestFilter.java
--
diff --git 
a/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsContainerRequestFilter.java
 
b/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsContainerRequestFilter.java
index 003e674..44ba01a 100644
--- 
a/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsContainerRequestFilter.java
+++ 
b/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsContainerRequestFilter.java
@@ -60,9 +60,12 @@ public class JwsContainerRequestFilter extends 
AbstractJwsReaderProvider impleme
 context.getHeaders().putSingle("Content-Type", ct);
 }
 
-SecurityContext securityContext = 
configureSecurityContext(theSigVerifier);
-if (securityContext != null) {
-JAXRSUtils.getCurrentMessage().put(SecurityContext.class, 
securityContext);
+Principal currentPrincipal = 
context.getSecurityContext().getUserPrincipal(); 
+if (currentPrincipal != null && currentPrincipal.getName() != null) {
+SecurityContext securityContext = 
configureSecurityContext(theSigVerifier);
+if (securityContext != null) {
+JAXRSUtils.getCurrentMessage().put(SecurityContext.class, 
securityContext);
+}
 }
 }
 



cxf git commit: Updating oidc demos

2015-12-01 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/master 813321ea2 -> f33bd39ce


Updating oidc demos


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

Branch: refs/heads/master
Commit: f33bd39ce1930d72dda33c158263dee2bf43ad22
Parents: 813321e
Author: Sergey Beryozkin 
Authored: Tue Dec 1 17:08:01 2015 +
Committer: Sergey Beryozkin 
Committed: Tue Dec 1 17:08:01 2015 +

--
 .../basic_oidc/src/main/webapp/WEB-INF/applicationContext.xml| 2 +-
 .../big_query/src/main/webapp/WEB-INF/applicationContext.xml | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/f33bd39c/distribution/src/main/release/samples/jax_rs/basic_oidc/src/main/webapp/WEB-INF/applicationContext.xml
--
diff --git 
a/distribution/src/main/release/samples/jax_rs/basic_oidc/src/main/webapp/WEB-INF/applicationContext.xml
 
b/distribution/src/main/release/samples/jax_rs/basic_oidc/src/main/webapp/WEB-INF/applicationContext.xml
index 6113a9b..91f6dea 100644
--- 
a/distribution/src/main/release/samples/jax_rs/basic_oidc/src/main/webapp/WEB-INF/applicationContext.xml
+++ 
b/distribution/src/main/release/samples/jax_rs/basic_oidc/src/main/webapp/WEB-INF/applicationContext.xml
@@ -112,7 +112,7 @@
 
  
  
-  
+  
  
   
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/f33bd39c/distribution/src/main/release/samples/jax_rs/big_query/src/main/webapp/WEB-INF/applicationContext.xml
--
diff --git 
a/distribution/src/main/release/samples/jax_rs/big_query/src/main/webapp/WEB-INF/applicationContext.xml
 
b/distribution/src/main/release/samples/jax_rs/big_query/src/main/webapp/WEB-INF/applicationContext.xml
index 7171797..d8f9ef4 100644
--- 
a/distribution/src/main/release/samples/jax_rs/big_query/src/main/webapp/WEB-INF/applicationContext.xml
+++ 
b/distribution/src/main/release/samples/jax_rs/big_query/src/main/webapp/WEB-INF/applicationContext.xml
@@ -189,8 +189,8 @@
  
  
  
-  
- 
+  
+ 
   
 
 



cxf git commit: Updating oidc demos

2015-12-01 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 088dcdf8c -> 924e6646a


Updating oidc demos


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

Branch: refs/heads/3.1.x-fixes
Commit: 924e6646acc21451c048d72056e90ff42b9c49c0
Parents: 088dcdf
Author: Sergey Beryozkin 
Authored: Tue Dec 1 17:08:01 2015 +
Committer: Sergey Beryozkin 
Committed: Tue Dec 1 17:09:28 2015 +

--
 .../basic_oidc/src/main/webapp/WEB-INF/applicationContext.xml| 2 +-
 .../big_query/src/main/webapp/WEB-INF/applicationContext.xml | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/924e6646/distribution/src/main/release/samples/jax_rs/basic_oidc/src/main/webapp/WEB-INF/applicationContext.xml
--
diff --git 
a/distribution/src/main/release/samples/jax_rs/basic_oidc/src/main/webapp/WEB-INF/applicationContext.xml
 
b/distribution/src/main/release/samples/jax_rs/basic_oidc/src/main/webapp/WEB-INF/applicationContext.xml
index 6113a9b..91f6dea 100644
--- 
a/distribution/src/main/release/samples/jax_rs/basic_oidc/src/main/webapp/WEB-INF/applicationContext.xml
+++ 
b/distribution/src/main/release/samples/jax_rs/basic_oidc/src/main/webapp/WEB-INF/applicationContext.xml
@@ -112,7 +112,7 @@
 
  
  
-  
+  
  
   
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/924e6646/distribution/src/main/release/samples/jax_rs/big_query/src/main/webapp/WEB-INF/applicationContext.xml
--
diff --git 
a/distribution/src/main/release/samples/jax_rs/big_query/src/main/webapp/WEB-INF/applicationContext.xml
 
b/distribution/src/main/release/samples/jax_rs/big_query/src/main/webapp/WEB-INF/applicationContext.xml
index 7171797..d8f9ef4 100644
--- 
a/distribution/src/main/release/samples/jax_rs/big_query/src/main/webapp/WEB-INF/applicationContext.xml
+++ 
b/distribution/src/main/release/samples/jax_rs/big_query/src/main/webapp/WEB-INF/applicationContext.xml
@@ -189,8 +189,8 @@
  
  
  
-  
- 
+  
+ 
   
 
 



cxf-fediz git commit: Regenerated Keystore to add CA Flag to Certificate

2015-12-01 Thread jbernhardt
Repository: cxf-fediz
Updated Branches:
  refs/heads/master 71099cd18 -> 9bbab2a88


Regenerated Keystore to add CA Flag to Certificate


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

Branch: refs/heads/master
Commit: 9bbab2a883c3272b16f0f2d6ea2fcef904789f37
Parents: 71099cd
Author: Jan Bernhardt 
Authored: Tue Dec 1 20:58:15 2015 +0100
Committer: Jan Bernhardt 
Committed: Tue Dec 1 20:58:53 2015 +0100

--
 services/idp/src/main/resources/idp-ssl-key.jks  | Bin 2074 -> 2216 bytes
 .../idp/src/main/resources/idp-ssl-trust.jks | Bin 783 -> 927 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/9bbab2a8/services/idp/src/main/resources/idp-ssl-key.jks
--
diff --git a/services/idp/src/main/resources/idp-ssl-key.jks 
b/services/idp/src/main/resources/idp-ssl-key.jks
index ae3d010..bddb6f5 100644
Binary files a/services/idp/src/main/resources/idp-ssl-key.jks and 
b/services/idp/src/main/resources/idp-ssl-key.jks differ

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/9bbab2a8/services/idp/src/main/resources/idp-ssl-trust.jks
--
diff --git a/services/idp/src/main/resources/idp-ssl-trust.jks 
b/services/idp/src/main/resources/idp-ssl-trust.jks
index 21ea181..36bc67b 100644
Binary files a/services/idp/src/main/resources/idp-ssl-trust.jks and 
b/services/idp/src/main/resources/idp-ssl-trust.jks differ



cxf git commit: make systests/databinding not fetch remote web-app_2_3.dtd

2015-12-01 Thread ay
Repository: cxf
Updated Branches:
  refs/heads/master f2b0bc813 -> c6b6c5766


make systests/databinding not fetch remote web-app_2_3.dtd


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

Branch: refs/heads/master
Commit: c6b6c5766d11df20efc41b8e47f6b22d014203ce
Parents: f2b0bc8
Author: Akitoshi Yoshida 
Authored: Tue Dec 1 10:57:13 2015 +0100
Committer: Akitoshi Yoshida 
Committed: Tue Dec 1 10:57:31 2015 +0100

--
 systests/databinding/pom.xml | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/c6b6c576/systests/databinding/pom.xml
--
diff --git a/systests/databinding/pom.xml b/systests/databinding/pom.xml
index c6712e3..ce62f87 100644
--- a/systests/databinding/pom.xml
+++ b/systests/databinding/pom.xml
@@ -185,6 +185,10 @@
 ${project.version}
 
 
+${cxf.servlet-api.group}
+${cxf.servlet-api.artifact}
+
+
 org.eclipse.jetty
 jetty-server
 



cxf git commit: make systests/databinding not fetch remote web-app_2_3.dtd (for 3.2.x and 3.1.x only)

2015-12-01 Thread ay
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes a400eaa95 -> 2f5f034b8


make systests/databinding not fetch remote web-app_2_3.dtd (for 3.2.x and 3.1.x 
only)


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

Branch: refs/heads/3.1.x-fixes
Commit: 2f5f034b8e8361aed103de5bd7fa7526847ac690
Parents: a400eaa
Author: Akitoshi Yoshida 
Authored: Tue Dec 1 10:57:13 2015 +0100
Committer: Akitoshi Yoshida 
Committed: Tue Dec 1 10:59:03 2015 +0100

--
 systests/databinding/pom.xml | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/2f5f034b/systests/databinding/pom.xml
--
diff --git a/systests/databinding/pom.xml b/systests/databinding/pom.xml
index a3ac24b..3c5c009 100644
--- a/systests/databinding/pom.xml
+++ b/systests/databinding/pom.xml
@@ -185,6 +185,10 @@
 ${project.version}
 
 
+${cxf.servlet-api.group}
+${cxf.servlet-api.artifact}
+
+
 org.eclipse.jetty
 jetty-server
 



cxf git commit: Adding JAX-RS 2 extension for handling @BeanParam and @MatrixParam

2015-12-01 Thread ilgrosso
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 2f5f034b8 -> cc591f4a3


Adding JAX-RS 2 extension for handling @BeanParam and @MatrixParam


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

Branch: refs/heads/3.1.x-fixes
Commit: cc591f4a3b205a5dae58cadb79828d524a424513
Parents: 2f5f034
Author: Francesco Chicchiriccò 
Authored: Mon Nov 30 16:13:17 2015 +0100
Committer: Francesco Chicchiriccò 
Committed: Tue Dec 1 12:00:20 2015 +0100

--
 parent/pom.xml  |   2 +-
 .../cxf/jaxrs/swagger/JaxRs2Extension.java  | 151 +++
 .../cxf/jaxrs/swagger/MatrixParameter.java  |  28 
 .../io.swagger.jaxrs.ext.SwaggerExtension   |   1 +
 .../cxf/jaxrs/swagger/SwaggerUtilsTest.java |   6 +-
 .../src/test/resources/swagger20.json   |  15 +-
 6 files changed, 200 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/cc591f4a/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index 210c0b0..8ca9fdb 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -144,7 +144,7 @@
 1.2.1
 1.3.1.RELEASE
 spring-test
-1.3.12
+1.3.13
 1.5.4
 1.7
 4.4.1

http://git-wip-us.apache.org/repos/asf/cxf/blob/cc591f4a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/JaxRs2Extension.java
--
diff --git 
a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/JaxRs2Extension.java
 
b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/JaxRs2Extension.java
new file mode 100644
index 000..3c8ae95
--- /dev/null
+++ 
b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/JaxRs2Extension.java
@@ -0,0 +1,151 @@
+/**
+ * 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.jaxrs.swagger;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import javax.ws.rs.BeanParam;
+import javax.ws.rs.MatrixParam;
+
+import com.fasterxml.jackson.databind.BeanDescription;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.introspect.AnnotatedField;
+import com.fasterxml.jackson.databind.introspect.AnnotatedMethod;
+import com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition;
+
+import io.swagger.converter.ModelConverters;
+import io.swagger.jaxrs.ext.AbstractSwaggerExtension;
+import io.swagger.jaxrs.ext.SwaggerExtension;
+import io.swagger.jaxrs.ext.SwaggerExtensions;
+import io.swagger.models.parameters.Parameter;
+import io.swagger.models.properties.ArrayProperty;
+import io.swagger.models.properties.Property;
+import io.swagger.models.properties.RefProperty;
+import io.swagger.models.properties.StringProperty;
+import io.swagger.util.Json;
+import io.swagger.util.ParameterProcessor;
+
+public class JaxRs2Extension extends AbstractSwaggerExtension {
+
+private final ObjectMapper mapper = Json.mapper();
+
+@Override
+public List extractParameters(
+final List annotations,
+final Type type,
+final Set typesToSkip,
+final Iterator chain) {
+
+if (shouldIgnoreType(type, typesToSkip)) {
+return new ArrayList<>();
+}
+
+List parameters = new ArrayList<>();
+for (Annotation annotation : annotations) {
+if (annotation instanceof MatrixParam) {
+MatrixParam param = (MatrixParam) annotation;
+MatrixParameter mp = new MatrixParameter().name(param.value());
+
+Property schema = createProperty(type);
+if (schema != null) {
+   

[1/2] cxf git commit: [CXF-6695] Adding JAX-RS 2 extension for handling @BeanParam and @MatrixParam

2015-12-01 Thread ilgrosso
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 1c635e00a -> 3ff04d2b4
  refs/heads/master c6b6c5766 -> ec15e3580


[CXF-6695] Adding JAX-RS 2 extension for handling @BeanParam and @MatrixParam


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

Branch: refs/heads/master
Commit: ec15e35805cf21c03d9eb922241ed4c02419c7e2
Parents: c6b6c57
Author: Francesco Chicchiriccò 
Authored: Mon Nov 30 16:13:17 2015 +0100
Committer: Francesco Chicchiriccò 
Committed: Tue Dec 1 11:16:11 2015 +0100

--
 parent/pom.xml  |   2 +-
 .../cxf/jaxrs/swagger/JaxRs2Extension.java  | 151 +++
 .../cxf/jaxrs/swagger/MatrixParameter.java  |  28 
 .../io.swagger.jaxrs.ext.SwaggerExtension   |   1 +
 .../cxf/jaxrs/swagger/SwaggerUtilsTest.java |   6 +-
 .../src/test/resources/swagger20.json   |  15 +-
 6 files changed, 200 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/ec15e358/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index ebecbd9..3df4832 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -144,7 +144,7 @@
 1.2.1
 1.3.1.RELEASE
 spring-test
-1.3.12
+1.3.13
 1.5.4
 1.7
 4.4.1

http://git-wip-us.apache.org/repos/asf/cxf/blob/ec15e358/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/JaxRs2Extension.java
--
diff --git 
a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/JaxRs2Extension.java
 
b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/JaxRs2Extension.java
new file mode 100644
index 000..3c8ae95
--- /dev/null
+++ 
b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/JaxRs2Extension.java
@@ -0,0 +1,151 @@
+/**
+ * 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.jaxrs.swagger;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import javax.ws.rs.BeanParam;
+import javax.ws.rs.MatrixParam;
+
+import com.fasterxml.jackson.databind.BeanDescription;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.introspect.AnnotatedField;
+import com.fasterxml.jackson.databind.introspect.AnnotatedMethod;
+import com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition;
+
+import io.swagger.converter.ModelConverters;
+import io.swagger.jaxrs.ext.AbstractSwaggerExtension;
+import io.swagger.jaxrs.ext.SwaggerExtension;
+import io.swagger.jaxrs.ext.SwaggerExtensions;
+import io.swagger.models.parameters.Parameter;
+import io.swagger.models.properties.ArrayProperty;
+import io.swagger.models.properties.Property;
+import io.swagger.models.properties.RefProperty;
+import io.swagger.models.properties.StringProperty;
+import io.swagger.util.Json;
+import io.swagger.util.ParameterProcessor;
+
+public class JaxRs2Extension extends AbstractSwaggerExtension {
+
+private final ObjectMapper mapper = Json.mapper();
+
+@Override
+public List extractParameters(
+final List annotations,
+final Type type,
+final Set typesToSkip,
+final Iterator chain) {
+
+if (shouldIgnoreType(type, typesToSkip)) {
+return new ArrayList<>();
+}
+
+List parameters = new ArrayList<>();
+for (Annotation annotation : annotations) {
+if (annotation instanceof MatrixParam) {
+MatrixParam param = (MatrixParam) annotation;
+MatrixParameter mp = new MatrixParameter().name(param.value());
+
+Property schema = 

[2/2] cxf git commit: [CXF-6695] Adding JAX-RS 2 extension for handling @BeanParam

2015-12-01 Thread ilgrosso
[CXF-6695] Adding JAX-RS 2 extension for handling @BeanParam


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

Branch: refs/heads/3.0.x-fixes
Commit: 3ff04d2b458b867ea6437a7ed9949d834b16e346
Parents: 1c635e0
Author: Francesco Chicchiriccò 
Authored: Tue Dec 1 11:59:35 2015 +0100
Committer: Francesco Chicchiriccò 
Committed: Tue Dec 1 11:59:35 2015 +0100

--
 parent/pom.xml  |   2 +-
 .../cxf/jaxrs/swagger/JaxRs2Extension.java  | 151 +++
 .../cxf/jaxrs/swagger/MatrixParameter.java  |  28 
 .../io.swagger.jaxrs.ext.SwaggerExtension   |   1 +
 .../cxf/jaxrs/swagger/SwaggerUtilsTest.java |   6 +-
 .../src/test/resources/swagger20.json   |  15 +-
 6 files changed, 200 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/3ff04d2b/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index 5c696e3..ee9b504 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -158,7 +158,7 @@
 1.2.1
 1.3.1.RELEASE
 spring-test
-1.3.12
+1.3.13
 1.5.4
 1.7
 4.4.1

http://git-wip-us.apache.org/repos/asf/cxf/blob/3ff04d2b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/JaxRs2Extension.java
--
diff --git 
a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/JaxRs2Extension.java
 
b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/JaxRs2Extension.java
new file mode 100644
index 000..55054da
--- /dev/null
+++ 
b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/JaxRs2Extension.java
@@ -0,0 +1,151 @@
+/**
+ * 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.jaxrs.swagger;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import javax.ws.rs.BeanParam;
+import javax.ws.rs.MatrixParam;
+
+import com.fasterxml.jackson.databind.BeanDescription;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.introspect.AnnotatedField;
+import com.fasterxml.jackson.databind.introspect.AnnotatedMethod;
+import com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition;
+
+import io.swagger.converter.ModelConverters;
+import io.swagger.jaxrs.ext.AbstractSwaggerExtension;
+import io.swagger.jaxrs.ext.SwaggerExtension;
+import io.swagger.jaxrs.ext.SwaggerExtensions;
+import io.swagger.models.parameters.Parameter;
+import io.swagger.models.properties.ArrayProperty;
+import io.swagger.models.properties.Property;
+import io.swagger.models.properties.RefProperty;
+import io.swagger.models.properties.StringProperty;
+import io.swagger.util.Json;
+import io.swagger.util.ParameterProcessor;
+
+public class JaxRs2Extension extends AbstractSwaggerExtension {
+
+private final ObjectMapper mapper = Json.mapper();
+
+@Override
+public List extractParameters(
+final List annotations,
+final Type type,
+final Set typesToSkip,
+final Iterator chain) {
+
+if (shouldIgnoreType(type, typesToSkip)) {
+return new ArrayList();
+}
+
+List parameters = new ArrayList();
+for (Annotation annotation : annotations) {
+if (annotation instanceof MatrixParam) {
+MatrixParam param = (MatrixParam) annotation;
+MatrixParameter mp = new MatrixParameter().name(param.value());
+
+Property schema = createProperty(type);
+if (schema != null) {
+mp.setProperty(schema);
+}
+parameters.add(mp);
+ 

cxf-fediz git commit: Improved Registration Page

2015-12-01 Thread jbernhardt
Repository: cxf-fediz
Updated Branches:
  refs/heads/master d05027bce -> e5c3ea7c4


Improved Registration Page


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

Branch: refs/heads/master
Commit: e5c3ea7c418b10bee4bcfe74db0c9c2aaf5d8c06
Parents: d05027b
Author: Jan Bernhardt 
Authored: Tue Dec 1 13:53:02 2015 +0100
Committer: Jan Bernhardt 
Committed: Tue Dec 1 13:59:01 2015 +0100

--
 .../service/oidc/ClientRegistrationService.java | 36 +
 .../src/main/webapp/WEB-INF/views/consumers.jsp | 65 ---
 .../src/main/webapp/WEB-INF/views/hashSet.jsp   | 83 
 3 files changed, 105 insertions(+), 79 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e5c3ea7c/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/ClientRegistrationService.java
--
diff --git 
a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/ClientRegistrationService.java
 
b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/ClientRegistrationService.java
index 87c0381..c663b09 100644
--- 
a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/ClientRegistrationService.java
+++ 
b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/ClientRegistrationService.java
@@ -19,8 +19,8 @@
 
 package org.apache.cxf.fediz.service.oidc;
 
+import java.util.Collection;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.LinkedHashMap;
 import java.util.Map;
@@ -38,16 +38,14 @@ import javax.ws.rs.core.SecurityContext;
 
 import org.apache.commons.lang3.StringUtils;
 import org.apache.cxf.common.util.Base64UrlUtility;
-import org.apache.cxf.rs.security.oauth2.client.Consumer;
-import org.apache.cxf.rs.security.oauth2.client.Consumers;
 import org.apache.cxf.rs.security.oauth2.common.Client;
 import org.apache.cxf.rt.security.crypto.CryptoUtils;
 
 @Path("/")
 public class ClientRegistrationService {
 
-private Map> registrations = 
-new ConcurrentHashMap>();
+private Map registrations = 
+new ConcurrentHashMap();
 private OAuthDataManager manager;
 private Map homeRealms = new LinkedHashMap();
 @Context
@@ -61,11 +59,18 @@ public class ClientRegistrationService {
 return new RegisterClient(homeRealms);
 }
 
+@GET
+@Produces(MediaType.TEXT_HTML)
+@Path("/register")
+public Collection registerForm() {
+return getClientRegistrations();
+}
+
 @POST
 @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
 @Produces(MediaType.TEXT_HTML)
 @Path("/register")
-public Consumers registerForm(@FormParam("appName") String appName,
+public Collection registerForm(@FormParam("appName") String 
appName,
  @FormParam("appDescription") String appDesc,
  @FormParam("appType") String appType,
  @FormParam("redirectURI") String redirectURI,
@@ -94,19 +99,22 @@ public class ClientRegistrationService {
 return 
Base64UrlUtility.encode(CryptoUtils.generateSecureRandomBytes(keySizeOctets));
 }
 
-private Consumers registerNewClient(Client newClient) {
+protected Collection registerNewClient(Client newClient) {
 manager.setClient(newClient);
+Collection clientRegistrations = getClientRegistrations();
+clientRegistrations.add(newClient);
+return clientRegistrations;
+
+}
+
+protected Collection getClientRegistrations() {
 String userName = sc.getUserPrincipal().getName();
-Map userClientRegs = registrations.get(userName);
+Collection userClientRegs = registrations.get(userName);
 if (userClientRegs == null) {
-userClientRegs = new HashMap();
+userClientRegs = new HashSet();
 registrations.put(userName, userClientRegs);
 }
-Consumer c = new Consumer(newClient.getClientId(), 
newClient.getClientSecret());
-c.setDescription(newClient.getApplicationDescription());
-userClientRegs.put(newClient.getClientId(), c);
-return new Consumers(new HashSet(userClientRegs.values()));
-
+return userClientRegs;
 }
 
 public void setDataProvider(OAuthDataManager m) {


cxf git commit: Initial work toward linking Client and Consumer as suggested by Jan

2015-12-01 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/master ec15e3580 -> 6d58c0742


Initial work toward linking Client and Consumer as suggested by Jan


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

Branch: refs/heads/master
Commit: 6d58c07420b09e1f617084661f03c418a5b4bed7
Parents: ec15e35
Author: Sergey Beryozkin 
Authored: Tue Dec 1 12:30:20 2015 +
Committer: Sergey Beryozkin 
Committed: Tue Dec 1 12:30:20 2015 +

--
 .../oauth2/client/ClientCodeRequestFilter.java  |  2 +-
 .../cxf/rs/security/oauth2/client/Consumer.java | 75 
 .../rs/security/oauth2/client/Consumers.java| 40 ---
 .../oauth2/client/OAuthClientUtils.java |  8 +--
 .../cxf/rs/security/oidc/rp/IdTokenReader.java  |  4 +-
 5 files changed, 36 insertions(+), 93 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/6d58c074/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
--
diff --git 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
index ae54e99..1af26c6 100644
--- 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
+++ 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
@@ -135,7 +135,7 @@ public class ClientCodeRequestFilter implements 
ContainerRequestFilter {
 String redirectScope = redirectState != null ? 
redirectState.getFirst(OAuthConstants.SCOPE) : null;
 String theScope = redirectScope != null ? redirectScope : scopes;
 UriBuilder ub = 
OAuthClientUtils.getAuthorizationURIBuilder(authorizationServiceUri, 
- consumer.getKey(), 
+ consumer.getClientId(), 
  
getAbsoluteRedirectUri(ui).toString(), 
  theState, 
  theScope);

http://git-wip-us.apache.org/repos/asf/cxf/blob/6d58c074/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/Consumer.java
--
diff --git 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/Consumer.java
 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/Consumer.java
index e592ec9..f58c28a 100644
--- 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/Consumer.java
+++ 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/Consumer.java
@@ -18,80 +18,63 @@
  */
 package org.apache.cxf.rs.security.oauth2.client;
 
-import java.util.HashSet;
-import java.util.Set;
-
 public class Consumer {
 
-private String key;
-private String secret;
-private Set redirectURIs;
-private String name;
-private String description;
-
+private String clientId;
+private String clientSecret;
+
 public Consumer() {
 
 }
 
-public Consumer(String key, String secret) {
-this.setKey(key);
-this.setSecret(secret);
+public Consumer(String id, String secret) {
+this.clientId = id;
+this.clientSecret = secret;
 }
 
+@Deprecated
 public String getKey() {
-return key;
+return getClientId();
 }
 
+@Deprecated
 public void setKey(String key) {
-this.key = key;
+setClientId(key);
+}
+
+public String getClientId() {
+return clientId;
+}
+
+public void setClientId(String id) {
+this.clientId = id;
 }
 
+@Deprecated
 public String getSecret() {
-return secret;
+return getClientSecret();
 }
 
+@Deprecated
 public void setSecret(String secret) {
-this.secret = secret;
+setClientSecret(secret);
 }
-
-public String getDescription() {
-return description;
+public String getClientSecret() {
+return clientSecret;
 }
 
-public void setDescription(String description) {
-this.description = description;
+public void setClientSecret(String secret) {
+this.clientSecret = secret;
 }
 

cxf git commit: Initial work toward linking Client and Consumer as suggested by Jan

2015-12-01 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes cc591f4a3 -> ba17570e5


Initial work toward linking Client and Consumer as suggested by Jan


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

Branch: refs/heads/3.1.x-fixes
Commit: ba17570e53cec4386f7c6fd40f075c6fbc1c3981
Parents: cc591f4
Author: Sergey Beryozkin 
Authored: Tue Dec 1 12:30:20 2015 +
Committer: Sergey Beryozkin 
Committed: Tue Dec 1 12:31:19 2015 +

--
 .../oauth2/client/ClientCodeRequestFilter.java  |  2 +-
 .../cxf/rs/security/oauth2/client/Consumer.java | 75 
 .../rs/security/oauth2/client/Consumers.java| 40 ---
 .../oauth2/client/OAuthClientUtils.java |  8 +--
 .../cxf/rs/security/oidc/rp/IdTokenReader.java  |  4 +-
 5 files changed, 36 insertions(+), 93 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/ba17570e/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
--
diff --git 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
index 0aa2347..eb47180 100644
--- 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
+++ 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
@@ -135,7 +135,7 @@ public class ClientCodeRequestFilter implements 
ContainerRequestFilter {
 String redirectScope = redirectState != null ? 
redirectState.getFirst(OAuthConstants.SCOPE) : null;
 String theScope = redirectScope != null ? redirectScope : scopes;
 UriBuilder ub = 
OAuthClientUtils.getAuthorizationURIBuilder(authorizationServiceUri, 
- consumer.getKey(), 
+ consumer.getClientId(), 
  
getAbsoluteRedirectUri(ui).toString(), 
  theState, 
  theScope);

http://git-wip-us.apache.org/repos/asf/cxf/blob/ba17570e/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/Consumer.java
--
diff --git 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/Consumer.java
 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/Consumer.java
index e592ec9..f58c28a 100644
--- 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/Consumer.java
+++ 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/Consumer.java
@@ -18,80 +18,63 @@
  */
 package org.apache.cxf.rs.security.oauth2.client;
 
-import java.util.HashSet;
-import java.util.Set;
-
 public class Consumer {
 
-private String key;
-private String secret;
-private Set redirectURIs;
-private String name;
-private String description;
-
+private String clientId;
+private String clientSecret;
+
 public Consumer() {
 
 }
 
-public Consumer(String key, String secret) {
-this.setKey(key);
-this.setSecret(secret);
+public Consumer(String id, String secret) {
+this.clientId = id;
+this.clientSecret = secret;
 }
 
+@Deprecated
 public String getKey() {
-return key;
+return getClientId();
 }
 
+@Deprecated
 public void setKey(String key) {
-this.key = key;
+setClientId(key);
+}
+
+public String getClientId() {
+return clientId;
+}
+
+public void setClientId(String id) {
+this.clientId = id;
 }
 
+@Deprecated
 public String getSecret() {
-return secret;
+return getClientSecret();
 }
 
+@Deprecated
 public void setSecret(String secret) {
-this.secret = secret;
+setClientSecret(secret);
 }
-
-public String getDescription() {
-return description;
+public String getClientSecret() {
+return clientSecret;
 }
 
-public void setDescription(String description) {
-this.description = description;
+public void setClientSecret(String secret) {
+this.clientSecret = 

[1/2] cxf git commit: Avoid some NPEs

2015-12-01 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes ba17570e5 -> c66b1a181


Avoid some NPEs


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

Branch: refs/heads/3.1.x-fixes
Commit: 82c4bff5276cc32490507fba4cb9d18539d41907
Parents: ba17570
Author: Colm O hEigeartaigh 
Authored: Tue Dec 1 12:11:12 2015 +
Committer: Colm O hEigeartaigh 
Committed: Tue Dec 1 14:04:46 2015 +

--
 .../cxf/rs/security/jose/common/KeyManagementUtils.java   | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/82c4bff5/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
--
diff --git 
a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
 
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
index b18295a..79b1aed 100644
--- 
a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
+++ 
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
@@ -236,11 +236,14 @@ public final class KeyManagementUtils {
 LOG.warning("No keystore file has been configured");
 throw new JoseException("No keystore file has been 
configured");
 }
-keyStore = 
(KeyStore)m.getExchange().get(props.get(JoseConstants.RSSEC_KEY_STORE_FILE));
+if (m != null) {
+keyStore = 
(KeyStore)m.getExchange().get(props.get(JoseConstants.RSSEC_KEY_STORE_FILE));
+}
 }
 
 if (keyStore == null) {
-keyStore = loadKeyStore(props, m.getExchange().getBus());
+Bus bus = m != null ? m.getExchange().getBus() : null;
+keyStore = loadKeyStore(props, bus);
 if (m != null) {
 
m.getExchange().put((String)props.get(JoseConstants.RSSEC_KEY_STORE_FILE), 
keyStore);
 }



[2/2] cxf git commit: Avoid some NPEs

2015-12-01 Thread coheigea
Avoid some NPEs


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

Branch: refs/heads/master
Commit: 49b24fa300107366b1f47e9415dc418eafd820b6
Parents: 6d58c07
Author: Colm O hEigeartaigh 
Authored: Tue Dec 1 12:11:12 2015 +
Committer: Colm O hEigeartaigh 
Committed: Tue Dec 1 14:02:44 2015 +

--
 .../cxf/rs/security/jose/common/KeyManagementUtils.java   | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/49b24fa3/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
--
diff --git 
a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
 
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
index b18295a..79b1aed 100644
--- 
a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
+++ 
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
@@ -236,11 +236,14 @@ public final class KeyManagementUtils {
 LOG.warning("No keystore file has been configured");
 throw new JoseException("No keystore file has been 
configured");
 }
-keyStore = 
(KeyStore)m.getExchange().get(props.get(JoseConstants.RSSEC_KEY_STORE_FILE));
+if (m != null) {
+keyStore = 
(KeyStore)m.getExchange().get(props.get(JoseConstants.RSSEC_KEY_STORE_FILE));
+}
 }
 
 if (keyStore == null) {
-keyStore = loadKeyStore(props, m.getExchange().getBus());
+Bus bus = m != null ? m.getExchange().getBus() : null;
+keyStore = loadKeyStore(props, bus);
 if (m != null) {
 
m.getExchange().put((String)props.get(JoseConstants.RSSEC_KEY_STORE_FILE), 
keyStore);
 }



[1/2] cxf git commit: Adding a filter to authenticate JWT Tokens for the JWT Bearer Client Authentication case

2015-12-01 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/master 6d58c0742 -> a4de4


Adding a filter to authenticate JWT Tokens for the JWT Bearer Client 
Authentication case


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

Branch: refs/heads/master
Commit: a4de468e4e068f63da91d917dfc0b87c3e3b
Parents: 49b24fa
Author: Colm O hEigeartaigh 
Authored: Tue Dec 1 14:02:22 2015 +
Committer: Colm O hEigeartaigh 
Committed: Tue Dec 1 14:02:44 2015 +

--
 .../jose/jaxrs/JwtAuthenticationFilter.java |  10 +-
 .../cxf/rs/security/jose/jwt/JwtUtils.java  |  12 ++
 rt/rs/security/oauth-parent/oauth2/pom.xml  |   2 +-
 .../oauth2/grants/jwt/AbstractJwtHandler.java   |  22 ++--
 .../oauth2/grants/jwt/JwtBearerAuthHandler.java | 111 +++
 5 files changed, 136 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/a4de/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationFilter.java
--
diff --git 
a/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationFilter.java
 
b/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationFilter.java
index e52897c..2dc6095 100644
--- 
a/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationFilter.java
+++ 
b/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationFilter.java
@@ -96,15 +96,7 @@ public class JwtAuthenticationFilter extends 
AbstractJoseJwtConsumer implements
 
 @Override
 protected void validateToken(JwtToken jwt) {
-// If we have no issued time then we need to have an expiry
-boolean expiredRequired = jwt.getClaims().getIssuedAt() == null;
-JwtUtils.validateJwtExpiry(jwt.getClaims(), clockOffset, 
expiredRequired);
-
-JwtUtils.validateJwtNotBefore(jwt.getClaims(), clockOffset, false);
-
-// If we have no expiry then we must have an issued at
-boolean issuedAtRequired = jwt.getClaims().getExpiryTime() == null;
-JwtUtils.validateJwtIssuedAt(jwt.getClaims(), ttl, clockOffset, 
issuedAtRequired);
+JwtUtils.validateTokenClaims(jwt.getClaims(), ttl, clockOffset);
 }
 
 public int getClockOffset() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/a4de/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java
--
diff --git 
a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java
 
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java
index 9f1c1d6..fa6989a 100644
--- 
a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java
+++ 
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java
@@ -110,4 +110,16 @@ public final class JwtUtils {
 }
 }
 
+public static void validateTokenClaims(JwtClaims claims, int timeToLive, 
int clockOffset) {
+// If we have no issued time then we need to have an expiry
+boolean expiredRequired = claims.getIssuedAt() == null;
+validateJwtExpiry(claims, clockOffset, expiredRequired);
+
+validateJwtNotBefore(claims, clockOffset, false);
+
+// If we have no expiry then we must have an issued at
+boolean issuedAtRequired = claims.getExpiryTime() == null;
+validateJwtIssuedAt(claims, timeToLive, clockOffset, issuedAtRequired);
+}
+
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/a4de/rt/rs/security/oauth-parent/oauth2/pom.xml
--
diff --git a/rt/rs/security/oauth-parent/oauth2/pom.xml 
b/rt/rs/security/oauth-parent/oauth2/pom.xml
index 17ea095..84af41c 100644
--- a/rt/rs/security/oauth-parent/oauth2/pom.xml
+++ b/rt/rs/security/oauth-parent/oauth2/pom.xml
@@ -44,7 +44,7 @@
 
 
 org.apache.cxf
-cxf-rt-rs-security-jose
+cxf-rt-rs-security-jose-jaxrs
 ${project.version}
  
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/a4de/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/jwt/AbstractJwtHandler.java

[2/2] cxf git commit: Adding a filter to authenticate JWT Tokens for the JWT Bearer Client Authentication case

2015-12-01 Thread coheigea
Adding a filter to authenticate JWT Tokens for the JWT Bearer Client 
Authentication case


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

Branch: refs/heads/3.1.x-fixes
Commit: c66b1a18100ac752e8a2fff712c01e6c682ffcd7
Parents: 82c4bff
Author: Colm O hEigeartaigh 
Authored: Tue Dec 1 14:02:22 2015 +
Committer: Colm O hEigeartaigh 
Committed: Tue Dec 1 14:04:48 2015 +

--
 .../jose/jaxrs/JwtAuthenticationFilter.java |  10 +-
 .../cxf/rs/security/jose/jwt/JwtUtils.java  |  12 ++
 rt/rs/security/oauth-parent/oauth2/pom.xml  |   2 +-
 .../oauth2/grants/jwt/AbstractJwtHandler.java   |  22 ++--
 .../oauth2/grants/jwt/JwtBearerAuthHandler.java | 111 +++
 5 files changed, 136 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/c66b1a18/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationFilter.java
--
diff --git 
a/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationFilter.java
 
b/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationFilter.java
index e52897c..2dc6095 100644
--- 
a/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationFilter.java
+++ 
b/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationFilter.java
@@ -96,15 +96,7 @@ public class JwtAuthenticationFilter extends 
AbstractJoseJwtConsumer implements
 
 @Override
 protected void validateToken(JwtToken jwt) {
-// If we have no issued time then we need to have an expiry
-boolean expiredRequired = jwt.getClaims().getIssuedAt() == null;
-JwtUtils.validateJwtExpiry(jwt.getClaims(), clockOffset, 
expiredRequired);
-
-JwtUtils.validateJwtNotBefore(jwt.getClaims(), clockOffset, false);
-
-// If we have no expiry then we must have an issued at
-boolean issuedAtRequired = jwt.getClaims().getExpiryTime() == null;
-JwtUtils.validateJwtIssuedAt(jwt.getClaims(), ttl, clockOffset, 
issuedAtRequired);
+JwtUtils.validateTokenClaims(jwt.getClaims(), ttl, clockOffset);
 }
 
 public int getClockOffset() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/c66b1a18/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java
--
diff --git 
a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java
 
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java
index 9f1c1d6..fa6989a 100644
--- 
a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java
+++ 
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java
@@ -110,4 +110,16 @@ public final class JwtUtils {
 }
 }
 
+public static void validateTokenClaims(JwtClaims claims, int timeToLive, 
int clockOffset) {
+// If we have no issued time then we need to have an expiry
+boolean expiredRequired = claims.getIssuedAt() == null;
+validateJwtExpiry(claims, clockOffset, expiredRequired);
+
+validateJwtNotBefore(claims, clockOffset, false);
+
+// If we have no expiry then we must have an issued at
+boolean issuedAtRequired = claims.getExpiryTime() == null;
+validateJwtIssuedAt(claims, timeToLive, clockOffset, issuedAtRequired);
+}
+
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/c66b1a18/rt/rs/security/oauth-parent/oauth2/pom.xml
--
diff --git a/rt/rs/security/oauth-parent/oauth2/pom.xml 
b/rt/rs/security/oauth-parent/oauth2/pom.xml
index 7886387..bdea3fe 100644
--- a/rt/rs/security/oauth-parent/oauth2/pom.xml
+++ b/rt/rs/security/oauth-parent/oauth2/pom.xml
@@ -44,7 +44,7 @@
 
 
 org.apache.cxf
-cxf-rt-rs-security-jose
+cxf-rt-rs-security-jose-jaxrs
 ${project.version}
  
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/c66b1a18/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/jwt/AbstractJwtHandler.java
--
diff --git 

[1/3] cxf git commit: Adding a filter to authenticate JWT Tokens for the JWT Bearer Client Authentication case

2015-12-01 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 3ff04d2b4 -> bd26eadf9


Adding a filter to authenticate JWT Tokens for the JWT Bearer Client 
Authentication case

Conflicts:

rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java


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

Branch: refs/heads/3.0.x-fixes
Commit: da4ea36fa12b745bee1894305df45b7c451d7bab
Parents: 3ff04d2
Author: Colm O hEigeartaigh 
Authored: Tue Dec 1 14:02:22 2015 +
Committer: Colm O hEigeartaigh 
Committed: Tue Dec 1 14:12:20 2015 +

--
 .../jose/jaxrs/JwtAuthenticationFilter.java |  10 +-
 .../cxf/rs/security/jose/jwt/JwtUtils.java  |  16 +++
 rt/rs/security/oauth-parent/oauth2/pom.xml  |   2 +-
 .../oauth2/grants/jwt/AbstractJwtHandler.java   |  22 ++--
 .../oauth2/grants/jwt/JwtBearerAuthHandler.java | 111 +++
 5 files changed, 140 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/da4ea36f/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationFilter.java
--
diff --git 
a/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationFilter.java
 
b/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationFilter.java
index 4f590c9..be781b9 100644
--- 
a/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationFilter.java
+++ 
b/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwtAuthenticationFilter.java
@@ -96,15 +96,7 @@ public class JwtAuthenticationFilter extends 
AbstractJoseJwtConsumer implements
 
 @Override
 protected void validateToken(JwtToken jwt) {
-// If we have no issued time then we need to have an expiry
-boolean expiredRequired = jwt.getClaims().getIssuedAt() == null;
-JwtUtils.validateJwtExpiry(jwt.getClaims(), clockOffset, 
expiredRequired);
-
-JwtUtils.validateJwtNotBefore(jwt.getClaims(), clockOffset, false);
-
-// If we have no expiry then we must have an issued at
-boolean issuedAtRequired = jwt.getClaims().getExpiryTime() == null;
-JwtUtils.validateJwtIssuedAt(jwt.getClaims(), ttl, clockOffset, 
issuedAtRequired);
+JwtUtils.validateTokenClaims(jwt.getClaims(), ttl, clockOffset);
 }
 
 public int getClockOffset() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/da4ea36f/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java
--
diff --git 
a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java
 
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java
index 4a54f49..641fbe1 100644
--- 
a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java
+++ 
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java
@@ -109,6 +109,7 @@ public final class JwtUtils {
 }
 }
 }
+<<< HEAD
 
 public static void validateJwtTimeClaims(JwtClaims claims, int clockOffset,
  int issuedAtRange, boolean 
claimsRequired) {
@@ -133,4 +134,19 @@ public final class JwtUtils {
 validateJwtTimeClaims(claims, 0, 0, false);
 }
 
+===
+
+public static void validateTokenClaims(JwtClaims claims, int timeToLive, 
int clockOffset) {
+// If we have no issued time then we need to have an expiry
+boolean expiredRequired = claims.getIssuedAt() == null;
+validateJwtExpiry(claims, clockOffset, expiredRequired);
+
+validateJwtNotBefore(claims, clockOffset, false);
+
+// If we have no expiry then we must have an issued at
+boolean issuedAtRequired = claims.getExpiryTime() == null;
+validateJwtIssuedAt(claims, timeToLive, clockOffset, issuedAtRequired);
+}
+
+>>> c66b1a1... Adding a filter to authenticate JWT Tokens for the JWT 
Bearer Client Authentication case
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/da4ea36f/rt/rs/security/oauth-parent/oauth2/pom.xml
--
diff --git a/rt/rs/security/oauth-parent/oauth2/pom.xml 

[3/3] cxf git commit: Fixing merge

2015-12-01 Thread coheigea
Fixing merge


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

Branch: refs/heads/3.0.x-fixes
Commit: bd26eadf9990343dc7d37c8090ef16e5999c06c9
Parents: c890d32
Author: Colm O hEigeartaigh 
Authored: Tue Dec 1 14:17:19 2015 +
Committer: Colm O hEigeartaigh 
Committed: Tue Dec 1 14:17:19 2015 +

--
 .../main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java  | 4 
 1 file changed, 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/bd26eadf/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java
--
diff --git 
a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java
 
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java
index 641fbe1..e739347 100644
--- 
a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java
+++ 
b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java
@@ -109,7 +109,6 @@ public final class JwtUtils {
 }
 }
 }
-<<< HEAD
 
 public static void validateJwtTimeClaims(JwtClaims claims, int clockOffset,
  int issuedAtRange, boolean 
claimsRequired) {
@@ -134,8 +133,6 @@ public final class JwtUtils {
 validateJwtTimeClaims(claims, 0, 0, false);
 }
 
-===
-
 public static void validateTokenClaims(JwtClaims claims, int timeToLive, 
int clockOffset) {
 // If we have no issued time then we need to have an expiry
 boolean expiredRequired = claims.getIssuedAt() == null;
@@ -148,5 +145,4 @@ public final class JwtUtils {
 validateJwtIssuedAt(claims, timeToLive, clockOffset, issuedAtRequired);
 }
 
->>> c66b1a1... Adding a filter to authenticate JWT Tokens for the JWT 
Bearer Client Authentication case
 }



[2/3] cxf git commit: Recording .gitmergeinfo Changes

2015-12-01 Thread coheigea
Recording .gitmergeinfo Changes


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

Branch: refs/heads/3.0.x-fixes
Commit: c890d32b38fc2c74d588ca57ba23829f225d4f89
Parents: da4ea36
Author: Colm O hEigeartaigh 
Authored: Tue Dec 1 14:12:21 2015 +
Committer: Colm O hEigeartaigh 
Committed: Tue Dec 1 14:12:21 2015 +

--
 .gitmergeinfo | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/c890d32b/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 50c501b..ff645de 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -286,6 +286,7 @@ B 80d7128a3ba1944a603c73e5e908d86c9bf27648
 B 8176b1b0faad2de44a4ff85083c74b5a4b74918a
 B 817727ddca9aad39a66f7001bf5f1c959dc7f581
 B 81bc682a409806567fc3485157e184e72feaf086
+B 82c4bff5276cc32490507fba4cb9d18539d41907
 B 842fade62621490a407729fa1357f043216f25e6
 B 8516661b64e630e033425b24b7af53680d1229ca
 B 857b55796dc7fc2b302e26d99f84df1712ff9c58
@@ -767,6 +768,7 @@ M c34bf7ad6bc55b6584dfd009f49a3f4eb8ececc9
 M c5548689b61809d26b20db1d08331b6988f92734
 M c55664128b1223667dedacc2011ccd5945d9c8b9
 M c5dbb84ac4e5bf73555e85ae1e65a5065393c602
+M c66b1a18100ac752e8a2fff712c01e6c682ffcd7
 M c72cac8cbd73d92a9e0264c816176c2a33dcbcf2
 M ca0a435219e82734269f2c8330f0989576f019d2
 M cda58270486b4d394b98a1a1a1d5bfcb366af2c1



cxf git commit: Reordering the way request dispatcher provider checks resources to ensure the more dynamic settings are prefferred

2015-12-01 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/master a4de4 -> 813321ea2


Reordering the way request dispatcher provider checks resources to ensure the 
more dynamic settings are prefferred


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

Branch: refs/heads/master
Commit: 813321ea28d184188f1591e26629632a34ee4c22
Parents: a4d
Author: Sergey Beryozkin 
Authored: Tue Dec 1 16:30:33 2015 +
Committer: Sergey Beryozkin 
Committed: Tue Dec 1 16:30:33 2015 +

--
 .../provider/RequestDispatcherProvider.java | 70 +++-
 1 file changed, 39 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/813321ea/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
--
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
index 4422d81..a2d239f 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
@@ -238,49 +238,57 @@ public class RequestDispatcherProvider extends 
AbstractConfigurableProvider
 }
 
 String getResourcePath(Class cls, Object o) {
-if (useClassNames) {
-return getClassResourceName(cls); 
+String currentResourcePath = getPathFromMessageContext();
+if (currentResourcePath != null) {
+return currentResourcePath;
 }
 
-String name = cls.getName();
-if (cls.isEnum()) {
-String enumResource = enumResources.get(o);
-if (enumResource != null) {
-return enumResource;
+if (!resourcePaths.isEmpty()) {
+
+String path = getRequestPath();
+for (Map.Entry entry : resourcePaths.entrySet()) {
+if (path.endsWith(entry.getKey())) {
+return entry.getValue();
+}
 }
-name += "." + o.toString(); 
-}
-
-String clsResourcePath = classResources.get(name);
-if (clsResourcePath != null) {
-return clsResourcePath;
 }
-if (resourcePath != null) {
-return resourcePath;
-}
-String path = getRequestPath();
-for (Map.Entry entry : resourcePaths.entrySet()) {
-if (path.endsWith(entry.getKey())) {
-return entry.getValue();
+if (!enumResources.isEmpty() || !classResources.isEmpty()) {
+String name = cls.getName();
+if (cls.isEnum()) {
+String enumResource = enumResources.get(o);
+if (enumResource != null) {
+return enumResource;
+}
+name += "." + o.toString(); 
+}
+
+String clsResourcePath = classResources.get(name);
+if (clsResourcePath != null) {
+return clsResourcePath;
 }
 }
 
-return getPathFromMessageContext();
+if (useClassNames) {
+return getClassResourceName(cls); 
+}
 
+return resourcePath;
 }
 
 private String getPathFromMessageContext() {
-Object resourcePathProp = 
(String)mc.get(MESSAGE_RESOURCE_PATH_PROPERTY);
-if (resourcePathProp != null) {
-StringBuilder sb = new StringBuilder();
-if (locationPrefix != null) {
-sb.append(locationPrefix);
-}
-sb.append(resourcePathProp.toString());
-if (resourceExtension != null) {
-sb.append(resourceExtension);
+if (mc != null) {
+Object resourcePathProp = 
(String)mc.get(MESSAGE_RESOURCE_PATH_PROPERTY);
+if (resourcePathProp != null) {
+StringBuilder sb = new StringBuilder();
+if (locationPrefix != null) {
+sb.append(locationPrefix);
+}
+sb.append(resourcePathProp.toString());
+if (resourceExtension != null) {
+sb.append(resourceExtension);
+}
+return sb.toString();
 }
-return sb.toString();
 }
 return null;
 }



cxf git commit: Reordering the way request dispatcher provider checks resources to ensure the more dynamic settings are prefferred

2015-12-01 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes c66b1a181 -> 088dcdf8c


Reordering the way request dispatcher provider checks resources to ensure the 
more dynamic settings are prefferred


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

Branch: refs/heads/3.1.x-fixes
Commit: 088dcdf8c7a3626adf650e80b98a9efd51d48653
Parents: c66b1a1
Author: Sergey Beryozkin 
Authored: Tue Dec 1 16:30:33 2015 +
Committer: Sergey Beryozkin 
Committed: Tue Dec 1 16:31:32 2015 +

--
 .../provider/RequestDispatcherProvider.java | 70 +++-
 1 file changed, 39 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/088dcdf8/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
--
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
index 4422d81..a2d239f 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
@@ -238,49 +238,57 @@ public class RequestDispatcherProvider extends 
AbstractConfigurableProvider
 }
 
 String getResourcePath(Class cls, Object o) {
-if (useClassNames) {
-return getClassResourceName(cls); 
+String currentResourcePath = getPathFromMessageContext();
+if (currentResourcePath != null) {
+return currentResourcePath;
 }
 
-String name = cls.getName();
-if (cls.isEnum()) {
-String enumResource = enumResources.get(o);
-if (enumResource != null) {
-return enumResource;
+if (!resourcePaths.isEmpty()) {
+
+String path = getRequestPath();
+for (Map.Entry entry : resourcePaths.entrySet()) {
+if (path.endsWith(entry.getKey())) {
+return entry.getValue();
+}
 }
-name += "." + o.toString(); 
-}
-
-String clsResourcePath = classResources.get(name);
-if (clsResourcePath != null) {
-return clsResourcePath;
 }
-if (resourcePath != null) {
-return resourcePath;
-}
-String path = getRequestPath();
-for (Map.Entry entry : resourcePaths.entrySet()) {
-if (path.endsWith(entry.getKey())) {
-return entry.getValue();
+if (!enumResources.isEmpty() || !classResources.isEmpty()) {
+String name = cls.getName();
+if (cls.isEnum()) {
+String enumResource = enumResources.get(o);
+if (enumResource != null) {
+return enumResource;
+}
+name += "." + o.toString(); 
+}
+
+String clsResourcePath = classResources.get(name);
+if (clsResourcePath != null) {
+return clsResourcePath;
 }
 }
 
-return getPathFromMessageContext();
+if (useClassNames) {
+return getClassResourceName(cls); 
+}
 
+return resourcePath;
 }
 
 private String getPathFromMessageContext() {
-Object resourcePathProp = 
(String)mc.get(MESSAGE_RESOURCE_PATH_PROPERTY);
-if (resourcePathProp != null) {
-StringBuilder sb = new StringBuilder();
-if (locationPrefix != null) {
-sb.append(locationPrefix);
-}
-sb.append(resourcePathProp.toString());
-if (resourceExtension != null) {
-sb.append(resourceExtension);
+if (mc != null) {
+Object resourcePathProp = 
(String)mc.get(MESSAGE_RESOURCE_PATH_PROPERTY);
+if (resourcePathProp != null) {
+StringBuilder sb = new StringBuilder();
+if (locationPrefix != null) {
+sb.append(locationPrefix);
+}
+sb.append(resourcePathProp.toString());
+if (resourceExtension != null) {
+sb.append(resourceExtension);
+}
+return sb.toString();
 }
-return sb.toString();
 }
 return null;
 }



cxf-fediz git commit: Renaming hashSet.jsp to registeredClients.jsp

2015-12-01 Thread sergeyb
Repository: cxf-fediz
Updated Branches:
  refs/heads/master e5c3ea7c4 -> b330d0096


Renaming hashSet.jsp to registeredClients.jsp


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

Branch: refs/heads/master
Commit: b330d009696118d0f6fb70145ab1083ffb18
Parents: e5c3ea7
Author: Sergey Beryozkin 
Authored: Tue Dec 1 16:40:50 2015 +
Committer: Sergey Beryozkin 
Committed: Tue Dec 1 16:40:50 2015 +

--
 .../main/webapp/WEB-INF/applicationContext.xml  |  5 ++
 .../src/main/webapp/WEB-INF/views/hashSet.jsp   | 83 
 .../webapp/WEB-INF/views/registeredClients.jsp  | 83 
 3 files changed, 88 insertions(+), 83 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/b330d009/services/oidc/src/main/webapp/WEB-INF/applicationContext.xml
--
diff --git a/services/oidc/src/main/webapp/WEB-INF/applicationContext.xml 
b/services/oidc/src/main/webapp/WEB-INF/applicationContext.xml
index a2bb650..c698c06 100644
--- a/services/oidc/src/main/webapp/WEB-INF/applicationContext.xml
+++ b/services/oidc/src/main/webapp/WEB-INF/applicationContext.xml
@@ -88,6 +88,11 @@



+   
+
+  
+
+   
 
 
 

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/b330d009/services/oidc/src/main/webapp/WEB-INF/views/hashSet.jsp
--
diff --git a/services/oidc/src/main/webapp/WEB-INF/views/hashSet.jsp 
b/services/oidc/src/main/webapp/WEB-INF/views/hashSet.jsp
deleted file mode 100644
index 99adac2..000
--- a/services/oidc/src/main/webapp/WEB-INF/views/hashSet.jsp
+++ /dev/null
@@ -1,83 +0,0 @@
-<%@ page import="org.apache.cxf.rs.security.oauth2.common.Client"%>
-<%@ page import="java.util.Collection"%>
-<%@ page import="javax.servlet.http.HttpServletRequest, 
org.apache.cxf.rs.security.oauth2.client.Consumer, 
org.apache.cxf.rs.security.oauth2.client.Consumers" %>
-
-<%
-   Collection regs = 
(Collection)request.getAttribute("data");
-String basePath = request.getContextPath() + request.getServletPath();
-if (!basePath.endsWith("/")) {
-basePath += "/";
-} 
-%>
-http://www.w3.org/1999/xhtml;>
-
-API Client Registration Confirmation
-
-   table {
-   border-collapse: collapse;
-   }
-   table th {
-   background-color: #f0f0f0;
-   border-color: #ccc;
-   border-style: solid;
-   border-width: 1px;
-   padding: 3px 4px;
-   text-align: center;
-   }
-   table td {
-   border-color: #ccc;
-   border-style: solid;
-   border-width: 1px;
-   padding: 3px 4px;
-   }
-   
-
-
-
-Registered API Clients
-
-
-Client NameClient IdentifierClient 
SecretRedirect URIs 
-<%
-   for (Client client : regs) {
-%>
-   
-   <%= client.getApplicationName() %>
-   
-   
-   <%
-  if (client.getClientSecret() != null) {
-   %>
-  
-   <%
-  } else {
-   %>
-  Unavailable for public client
-   <%
-  } 
-   %>
-   
-   
-   <% if(client.getRedirectUris() != null) {
-for (String redirectURI : client.getRedirectUris()) {
-  %>
-   <%=redirectURI %>
-   <%   }
-  } %>
-   
-   
-<%   
-   }
-%> 
-
-
-
-
-
-
-Back to Client Registration page
-
-
-
-
-

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/b330d009/services/oidc/src/main/webapp/WEB-INF/views/registeredClients.jsp
--
diff --git a/services/oidc/src/main/webapp/WEB-INF/views/registeredClients.jsp 
b/services/oidc/src/main/webapp/WEB-INF/views/registeredClients.jsp
new file mode 100644
index 000..5657e56
--- /dev/null
+++ b/services/oidc/src/main/webapp/WEB-INF/views/registeredClients.jsp
@@ -0,0 +1,83 @@
+<%@ page import="org.apache.cxf.rs.security.oauth2.common.Client"%>
+<%@ page import="java.util.Collection"%>
+<%@ page import="javax.servlet.http.HttpServletRequest" %>
+
+<%
+   Collection regs = 
(Collection)request.getAttribute("data");
+String basePath = request.getContextPath() + request.getServletPath();
+if