Populate relay state in outgoing messages
[java-idp.git] / src / edu / internet2 / middleware / shibboleth / idp / profile / saml1 / ShibbolethSSOProfileHandler.java
index 4f67174..026d1b1 100644 (file)
@@ -443,6 +443,7 @@ public class ShibbolethSSOProfileHandler extends AbstractSAML1ProfileHandler {
                 relyingPartyEndpoint.getBinding());
         encoder.setRelyingPartyEndpoint(relyingPartyEndpoint);
         super.populateMessageEncoder(encoder);
                 relyingPartyEndpoint.getBinding());
         encoder.setRelyingPartyEndpoint(relyingPartyEndpoint);
         super.populateMessageEncoder(encoder);
+        encoder.setRelayState(requestContext.getLoginContext().getSpTarget());
         ProfileResponse<ServletResponse> profileResponse = requestContext.getProfileResponse();
         encoder.setResponse(profileResponse.getRawResponse());
         encoder.setSamlMessage(requestContext.getSamlResponse());
         ProfileResponse<ServletResponse> profileResponse = requestContext.getProfileResponse();
         encoder.setResponse(profileResponse.getRawResponse());
         encoder.setSamlMessage(requestContext.getSamlResponse());