Removing unused code and rearranging
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user