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 2011/05/12 15:45:38 UTC
svn commit: r1102300 -
/cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
Author: coheigea
Date: Thu May 12 13:45:38 2011
New Revision: 1102300
URL: http://svn.apache.org/viewvc?rev=1102300&view=rev
Log:
Don't send a KeyType if one is being sent in the template.
Modified:
cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
Modified: cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java?rev=1102300&r1=1102299&r2=1102300&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java (original)
+++ cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java Thu May 12 13:45:38 2011
@@ -484,10 +484,12 @@ public class STSClient implements Config
if (sptt == null) {
addTokenType(writer);
}
+ if (isSecureConv) {
+ addLifetime(writer);
+ }
if (keyTypeTemplate == null) {
- keyTypeTemplate = keyType;
+ keyTypeTemplate = writeKeyType(writer, keyType);
}
- keyTypeTemplate = writeKeyType(writer, keyTypeTemplate);
byte[] requestorEntropy = null;
X509Certificate cert = null;
@@ -792,7 +794,6 @@ public class STSClient implements Config
private String writeKeyType(W3CDOMStreamWriter writer, String keyTypeToWrite)
throws XMLStreamException {
if (isSecureConv) {
- addLifetime(writer);
if (keyTypeToWrite == null) {
writer.writeStartElement("wst", "TokenType", namespace);
writer.writeCharacters(STSUtils.getTokenTypeSCT(namespace));