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) {
|
private void redirectUserWithRequest(HttpServletResponse httpServletResponse, AuthnRequest authnRequest) {
|
||||||
|
|
||||||
HTTPRedirectDeflateEncoder encoder = new HTTPRedirectDeflateEncoder();
|
|
||||||
MessageContext context = new MessageContext();
|
MessageContext context = new MessageContext();
|
||||||
|
|
||||||
|
context.setMessage(authnRequest);
|
||||||
|
|
||||||
SAMLPeerEntityContext peerEntityContext = context.getSubcontext(SAMLPeerEntityContext.class, true);
|
SAMLPeerEntityContext peerEntityContext = context.getSubcontext(SAMLPeerEntityContext.class, true);
|
||||||
|
|
||||||
SAMLEndpointContext endpointContext = peerEntityContext.getSubcontext(SAMLEndpointContext.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.getSubcontext(SecurityParametersContext.class, true).setSignatureSigningParameters(signatureSigningParameters);
|
||||||
|
|
||||||
context.setMessage(authnRequest);
|
HTTPRedirectDeflateEncoder encoder = new HTTPRedirectDeflateEncoder();
|
||||||
|
|
||||||
encoder.setMessageContext(context);
|
encoder.setMessageContext(context);
|
||||||
encoder.setHttpServletResponse(httpServletResponse);
|
encoder.setHttpServletResponse(httpServletResponse);
|
||||||
|
|||||||
@@ -241,16 +241,12 @@ public class ConsumerServlet extends HttpServlet {
|
|||||||
HttpClientRequestSOAP11Encoder encoder = new HttpClientRequestSOAP11Encoder();
|
HttpClientRequestSOAP11Encoder encoder = new HttpClientRequestSOAP11Encoder();
|
||||||
HttpClientResponseSOAP11Decoder decoder = new HttpClientResponseSOAP11Decoder();
|
HttpClientResponseSOAP11Decoder decoder = new HttpClientResponseSOAP11Decoder();
|
||||||
|
|
||||||
decoder.setBodyHandler(new SAMLSOAPDecoderBodyHandler());
|
|
||||||
BasicHttpClientMessagePipeline pipeline = new BasicHttpClientMessagePipeline(
|
BasicHttpClientMessagePipeline pipeline = new BasicHttpClientMessagePipeline(
|
||||||
encoder,
|
encoder,
|
||||||
decoder
|
decoder
|
||||||
);
|
);
|
||||||
|
|
||||||
BasicMessageHandlerChain<SAMLObject> outboundPayloadHandler = new BasicMessageHandlerChain<SAMLObject>();
|
pipeline.setOutboundPayloadHandler(new SAMLOutboundProtocolMessageSigningHandler());
|
||||||
outboundPayloadHandler.setHandlers(Lists.<MessageHandler<SAMLObject>>newArrayList(
|
|
||||||
new SAMLOutboundProtocolMessageSigningHandler()));
|
|
||||||
pipeline.setOutboundPayloadHandler(outboundPayloadHandler);
|
|
||||||
return pipeline;
|
return pipeline;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user