org.picketlink.identity.federation.web.filters
Class SPFilter
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
SPFilter
public SPFilter()
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 IDPresponseType
- ResponseType that has been generatedserverEnvironment
- tomcat,jboss etc
- Returns:
-
- Throws:
AssertionExpiredException
ConfigurationException
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.