PicketLink Federation Core 2.1.6.Final-redhat-2

org.picketlink.identity.federation.web.filters
Class SPFilter

java.lang.Object
  extended by org.picketlink.identity.federation.web.filters.SPFilter
All Implemented Interfaces:
javax.servlet.Filter

public class SPFilter
extends Object
implements javax.servlet.Filter

A service provider filter for web container agnostic providers

Since:
Aug 21, 2009
Author:
Anil.Saldhana@redhat.com

Field Summary
protected  String canonicalizationMethod
           
protected  String configFile
           
protected  String identityURL
           
protected  boolean ignoreSignatures
           
protected  PicketLinkType picketLinkConfiguration
           
protected  String serviceURL
           
protected  SPType spConfiguration
           
 
Constructor Summary
SPFilter()
           
 
Method Summary
protected  ResponseType decryptAssertion(ResponseType responseType)
           
 void destroy()
           
 void doFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain filterChain)
           
 Principal handleSAMLResponse(javax.servlet.http.HttpServletRequest request, ResponseType responseType)
          Handle the SAMLResponse from the IDP
 void init(javax.servlet.FilterConfig filterConfig)
           
protected  void isTrusted(String issuer)
           
protected  void sendRequestToIDP(AuthnRequestType authnRequest, String relayState, javax.servlet.http.HttpServletResponse response)
           
protected  void sendToDestination(Document samlDocument, String relayState, String destination, javax.servlet.http.HttpServletResponse response, boolean request)
           
protected  boolean validate(javax.servlet.http.HttpServletRequest request)
           
protected  boolean verifySignature(SAMLDocumentHolder samlDocumentHolder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

spConfiguration

protected SPType spConfiguration

picketLinkConfiguration

protected PicketLinkType picketLinkConfiguration

configFile

protected String configFile

serviceURL

protected String serviceURL

identityURL

protected String identityURL

ignoreSignatures

protected boolean ignoreSignatures

canonicalizationMethod

protected String canonicalizationMethod
Constructor Detail

SPFilter

public SPFilter()
Method Detail

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Filter

doFilter

public void doFilter(javax.servlet.ServletRequest servletRequest,
                     javax.servlet.ServletResponse servletResponse,
                     javax.servlet.FilterChain filterChain)
              throws IOException,
                     javax.servlet.ServletException
Specified by:
doFilter in interface javax.servlet.Filter
Throws:
IOException
javax.servlet.ServletException

init

public void init(javax.servlet.FilterConfig filterConfig)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException

sendRequestToIDP

protected void sendRequestToIDP(AuthnRequestType authnRequest,
                                String relayState,
                                javax.servlet.http.HttpServletResponse response)
                         throws IOException,
                                SAXException,
                                GeneralSecurityException
Throws:
IOException
SAXException
GeneralSecurityException

sendToDestination

protected void sendToDestination(Document samlDocument,
                                 String relayState,
                                 String destination,
                                 javax.servlet.http.HttpServletResponse response,
                                 boolean request)
                          throws IOException,
                                 SAXException,
                                 GeneralSecurityException
Throws:
IOException
SAXException
GeneralSecurityException

validate

protected boolean validate(javax.servlet.http.HttpServletRequest request)
                    throws IOException,
                           GeneralSecurityException
Throws:
IOException
GeneralSecurityException

verifySignature

protected boolean verifySignature(SAMLDocumentHolder samlDocumentHolder)
                           throws IssuerNotTrustedException
Throws:
IssuerNotTrustedException

isTrusted

protected void isTrusted(String issuer)
                  throws IssuerNotTrustedException
Throws:
IssuerNotTrustedException

decryptAssertion

protected ResponseType decryptAssertion(ResponseType responseType)

handleSAMLResponse

public Principal handleSAMLResponse(javax.servlet.http.HttpServletRequest request,
                                    ResponseType responseType)
                             throws ConfigurationException,
                                    AssertionExpiredException
Handle the SAMLResponse from the IDP

Parameters:
request - entire request from IDP
responseType - ResponseType that has been generated
serverEnvironment - tomcat,jboss etc
Returns:
Throws:
AssertionExpiredException
ConfigurationException

PicketLink Federation Core 2.1.6.Final-redhat-2

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.