Skip to content

Commit

Permalink
signature algorithm api fix, will now translate to constructed message
Browse files Browse the repository at this point in the history
  • Loading branch information
DamienJDev committed Mar 26, 2020
1 parent 97b5d59 commit f9fddaa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public abstract class STSIssuedTokenConfiguration implements IssuedTokenConfigur
public static final String STS_SERVICE_NAME ="sts-service-name";
public static final String STS_PORT_NAME ="sts-port-name";
public static final String STS_NAMESPACE ="sts-namespace";
public static final String STS_SIGNATURE_ALGORITHM ="sts-signature-algorithm";
public static final String LIFE_TIME = "LifeTime";
public static final String MAX_CLOCK_SKEW = "MaxClockSkew";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,9 @@ private BaseSTSResponse invokeRST(final RequestSecurityToken request, STSIssuedT
}
dispatch.getRequestContext().put(WSTrustConstants.IS_TRUST_MESSAGE, "true");
dispatch.getRequestContext().put(WSTrustConstants.TRUST_ACTION, getAction(wstVer, request.getRequestType().toString()));


dispatch.getRequestContext().put(STSIssuedTokenConfiguration.STS_SIGNATURE_ALGORITHM, stsConfig.getSignatureAlgorithm());

// Pass the keys and/or username, password to the message context
// String userName = (String) stsConfig.getOtherOptions().get(com.sun.xml.wss.XWSSConstants.USERNAME_PROPERTY);
// String password = (String) stsConfig.getOtherOptions().get(com.sun.xml.wss.XWSSConstants.PASSWORD_PROPERTY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public Packet processClientRequestPacket(Packet packet) {
ProcessingContext ctx = initializeOutgoingProcessingContext(packet, isSCMessage);
((ProcessingContextImpl) ctx).setIssuedTokenContextMap(issuedTokenContextMap);
((ProcessingContextImpl) ctx).setSCPolicyIDtoSctIdMap(scPolicyIDtoSctIdMap);
String sigAlg = (String)(packet.invocationProperties.get("sts-signature-algorithm"));
String sigAlg = (String)(packet.invocationProperties.get(STSIssuedTokenConfiguration.STS_SIGNATURE_ALGORITHM));
if(sigAlg!=null && (!sigAlg.equals(""))) {
((ProcessingContextImpl) ctx).getAlgorithmSuite().setSignatureAlgorithm(sigAlg);
}
Expand Down

0 comments on commit f9fddaa

Please sign in to comment.