cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf git commit: NPE fix
Date Fri, 28 Jul 2017 14:10:18 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 3fc5e2901 -> bb1e05690


NPE fix


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

Branch: refs/heads/master
Commit: bb1e05690f88ea3a4781bd7939c68c8c0495517c
Parents: 3fc5e29
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Jul 28 15:10:11 2017 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Jul 28 15:10:11 2017 +0100

----------------------------------------------------------------------
 .../security/saml/interceptor/WSS4JBasicAuthValidator.java  | 2 +-
 .../apache/cxf/sts/token/provider/jwt/JWTTokenProvider.java | 9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/bb1e0569/rt/security-saml/src/main/java/org/apache/cxf/rt/security/saml/interceptor/WSS4JBasicAuthValidator.java
----------------------------------------------------------------------
diff --git a/rt/security-saml/src/main/java/org/apache/cxf/rt/security/saml/interceptor/WSS4JBasicAuthValidator.java
b/rt/security-saml/src/main/java/org/apache/cxf/rt/security/saml/interceptor/WSS4JBasicAuthValidator.java
index 18eecd6..00a6227 100644
--- a/rt/security-saml/src/main/java/org/apache/cxf/rt/security/saml/interceptor/WSS4JBasicAuthValidator.java
+++ b/rt/security-saml/src/main/java/org/apache/cxf/rt/security/saml/interceptor/WSS4JBasicAuthValidator.java
@@ -48,7 +48,7 @@ import org.apache.wss4j.dom.validate.Validator;
 /**
  * An abstract class containing some functionality to validate a username + password received
  * via HTTP Basic Authentication via a WSS4J Validator (and hence JAAS, the STS, etc.). It
can
- * be subclasses and used as a CXF interceptor or else via a JAX-RS ContainerRequestFilter.
+ * be subclassed and used as a CXF interceptor or else via a JAX-RS ContainerRequestFilter.
  */
 public abstract class WSS4JBasicAuthValidator {
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/bb1e0569/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/jwt/JWTTokenProvider.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/jwt/JWTTokenProvider.java
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/jwt/JWTTokenProvider.java
index 7cab14d..9119a0c 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/jwt/JWTTokenProvider.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/jwt/JWTTokenProvider.java
@@ -245,9 +245,12 @@ public class JWTTokenProvider implements TokenProvider {
                 }
             }
             // Get the password
-            WSPasswordCallback[] cb = {new WSPasswordCallback(alias, WSPasswordCallback.SIGNATURE)};
-            callbackHandler.handle(cb);
-            String password = cb[0].getPassword();
+            String password = null;
+            if (callbackHandler != null) {
+                WSPasswordCallback[] cb = {new WSPasswordCallback(alias, WSPasswordCallback.SIGNATURE)};
+                callbackHandler.handle(cb);
+                password = cb[0].getPassword();
+            }
 
             Properties signingProperties = new Properties();
 


Mime
View raw message