Removing unused code and rearranging

This commit is contained in:
srasmusson
2016-05-16 00:36:04 +02:00
parent f5e89228f1
commit 8a1ca04645
2 changed files with 4 additions and 7 deletions

View File

@@ -88,9 +88,10 @@ public class AccessFilter implements Filter {
private void redirectUserWithRequest(HttpServletResponse httpServletResponse, AuthnRequest authnRequest) {
HTTPRedirectDeflateEncoder encoder = new HTTPRedirectDeflateEncoder();
MessageContext context = new MessageContext();
context.setMessage(authnRequest);
SAMLPeerEntityContext peerEntityContext = context.getSubcontext(SAMLPeerEntityContext.class, true);
SAMLEndpointContext endpointContext = peerEntityContext.getSubcontext(SAMLEndpointContext.class, true);
@@ -103,7 +104,7 @@ public class AccessFilter implements Filter {
context.getSubcontext(SecurityParametersContext.class, true).setSignatureSigningParameters(signatureSigningParameters);
context.setMessage(authnRequest);
HTTPRedirectDeflateEncoder encoder = new HTTPRedirectDeflateEncoder();
encoder.setMessageContext(context);
encoder.setHttpServletResponse(httpServletResponse);

View File

@@ -241,16 +241,12 @@ public class ConsumerServlet extends HttpServlet {
HttpClientRequestSOAP11Encoder encoder = new HttpClientRequestSOAP11Encoder();
HttpClientResponseSOAP11Decoder decoder = new HttpClientResponseSOAP11Decoder();
decoder.setBodyHandler(new SAMLSOAPDecoderBodyHandler());
BasicHttpClientMessagePipeline pipeline = new BasicHttpClientMessagePipeline(
encoder,
decoder
);
BasicMessageHandlerChain<SAMLObject> outboundPayloadHandler = new BasicMessageHandlerChain<SAMLObject>();
outboundPayloadHandler.setHandlers(Lists.<MessageHandler<SAMLObject>>newArrayList(
new SAMLOutboundProtocolMessageSigningHandler()));
pipeline.setOutboundPayloadHandler(outboundPayloadHandler);
pipeline.setOutboundPayloadHandler(new SAMLOutboundProtocolMessageSigningHandler());
return pipeline;
}};