cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject git commit: [CXF-6051] - "Support sp13:Nonce + sp13:Created in the UsernameTokenInterceptor"
Date Tue, 14 Oct 2014 14:08:20 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 7c4a01ead -> 0cfedc9a8


[CXF-6051] - "Support sp13:Nonce + sp13:Created in the UsernameTokenInterceptor"


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

Branch: refs/heads/master
Commit: 0cfedc9a8c608a1ba4879a51fce995c0f58e418b
Parents: 7c4a01e
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Tue Oct 14 15:07:35 2014 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Tue Oct 14 15:08:11 2014 +0100

----------------------------------------------------------------------
 .../cxf/ws/security/wss4j/UsernameTokenInterceptor.java       | 7 +++++++
 .../resources/org/apache/cxf/systest/ws/ut/DoubleItUt.wsdl    | 2 ++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/0cfedc9a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
index c999e1c..0c3196e 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
@@ -386,6 +386,13 @@ public class UsernameTokenInterceptor extends AbstractTokenInterceptor
{
                     utBuilder.setPasswordType(WSConstants.PASSWORD_TEXT);
                 }
                 
+                if (token.isCreated()) {
+                    utBuilder.addCreated();
+                }
+                if (token.isNonce()) {
+                    utBuilder.addNonce();
+                }
+                
                 utBuilder.setUserInfo(userName, password);
                 return utBuilder;
             } else {

http://git-wip-us.apache.org/repos/asf/cxf/blob/0cfedc9a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ut/DoubleItUt.wsdl
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ut/DoubleItUt.wsdl
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ut/DoubleItUt.wsdl
index 9504be2..0163227 100644
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ut/DoubleItUt.wsdl
+++ b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ut/DoubleItUt.wsdl
@@ -310,6 +310,8 @@
                         <sp:UsernameToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
                             <wsp:Policy>
                                 <sp:WssUsernameToken10/>
+                                <sp13:Created/>
+                                <sp13:Nonce/>
                             </wsp:Policy>
                         </sp:UsernameToken>
                     </wsp:Policy>


Mime
View raw message