You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2017/06/08 15:17:47 UTC
cxf git commit: Allow the password for signing to come from the
crypto properties file
Repository: cxf
Updated Branches:
refs/heads/master 4156266ea -> 7054ae68a
Allow the password for signing to come from the crypto properties file
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/7054ae68
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/7054ae68
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/7054ae68
Branch: refs/heads/master
Commit: 7054ae68a64216ed709eb7f61fba315789b9355c
Parents: 4156266
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Thu Jun 8 16:17:29 2017 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Thu Jun 8 16:17:29 2017 +0100
----------------------------------------------------------------------
.../sts/token/provider/AbstractSAMLTokenProvider.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/7054ae68/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/AbstractSAMLTokenProvider.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/AbstractSAMLTokenProvider.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/AbstractSAMLTokenProvider.java
index c3fceb2..65c7c2d 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/AbstractSAMLTokenProvider.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/AbstractSAMLTokenProvider.java
@@ -108,10 +108,13 @@ public abstract class AbstractSAMLTokenProvider {
}
}
// Get the password
- WSPasswordCallback[] cb = {new WSPasswordCallback(alias, WSPasswordCallback.SIGNATURE)};
- LOG.fine("Creating SAML Token");
- callbackHandler.handle(cb);
- String password = cb[0].getPassword();
+ String password = null;
+ if (callbackHandler != null) {
+ WSPasswordCallback[] cb = {new WSPasswordCallback(alias, WSPasswordCallback.SIGNATURE)};
+ LOG.fine("Creating SAML Token");
+ callbackHandler.handle(cb);
+ password = cb[0].getPassword();
+ }
LOG.fine("Signing SAML Token");
boolean useKeyValue = signatureProperties.isUseKeyValue();