org.jasig.portal.security.provider.saml
Class HttpRequestPostprocessor

java.lang.Object
  extended by org.jasig.portal.security.provider.saml.HttpRequestPostprocessor
All Implemented Interfaces:
org.apache.http.HttpResponseInterceptor

public final class HttpRequestPostprocessor
extends Object
implements org.apache.http.HttpResponseInterceptor

This class intercepts the HTTP responses and looks for the WSP authentication requests. These are recognized by the Content-Type matching the PAOS content type. WSP sending this content type can only mean one thing: authentication is required and the payload contains a SOAP authentication request to the IdP.

Author:
Adam Rybicki

Constructor Summary
HttpRequestPostprocessor(SAMLSession samlSession)
           
 
Method Summary
 void process(org.apache.http.HttpResponse res, org.apache.http.protocol.HttpContext ctx)
          This method triggers delegated SAML authentication when it is requested by the WSP.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpRequestPostprocessor

public HttpRequestPostprocessor(SAMLSession samlSession)
Method Detail

process

public void process(org.apache.http.HttpResponse res,
                    org.apache.http.protocol.HttpContext ctx)
             throws org.apache.http.HttpException,
                    IOException
This method triggers delegated SAML authentication when it is requested by the WSP. After a successful authentication, this method attempts to redirect the request to the location identified by the WSP at the end of the delegated SAML authentication. To do that, this method changes the HTTP status to a 302 and sets the Location header accordingly.

Specified by:
process in interface org.apache.http.HttpResponseInterceptor
Throws:
org.apache.http.HttpException
IOException
See Also:
HttpResponseInterceptor.process(org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext)


Copyright © 2011 Jasig. All Rights Reserved.