Class Saml2WebSsoAuthenticationRequestFilter
- java.lang.Object
-
- org.springframework.web.filter.GenericFilterBean
-
- org.springframework.web.filter.OncePerRequestFilter
-
- org.springframework.security.saml2.provider.service.web.Saml2WebSsoAuthenticationRequestFilter
-
- All Implemented Interfaces:
javax.servlet.Filter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.EnvironmentAware,org.springframework.core.env.EnvironmentCapable,org.springframework.web.context.ServletContextAware
- Direct Known Subclasses:
Saml2WebSsoAuthenticationRequestFilter
public class Saml2WebSsoAuthenticationRequestFilter extends org.springframework.web.filter.OncePerRequestFilterThisFilterformulates a SAML 2.0 AuthnRequest (line 1968) and redirects to a configured asserting party.It supports the HTTP-Redirect (line 520) and HTTP-POST (line 753) bindings.
By default, this
Filterresponds to authentication requests at theURI/saml2/authenticate/{registrationId}. TheURItemplate variable{registrationId}represents theregistration identifierof the relying party that is used for initiating the authentication request.- Since:
- 5.2
-
-
Constructor Summary
Constructors Constructor Description Saml2WebSsoAuthenticationRequestFilter(RelyingPartyRegistrationRepository relyingPartyRegistrationRepository)Deprecated.use the constructor that takes aSaml2AuthenticationRequestFactorySaml2WebSsoAuthenticationRequestFilter(Saml2AuthenticationRequestResolver authenticationRequestResolver)Construct aSaml2WebSsoAuthenticationRequestFilterwith the strategy for resolving theAuthnRequestSaml2WebSsoAuthenticationRequestFilter(Saml2AuthenticationRequestContextResolver authenticationRequestContextResolver, Saml2AuthenticationRequestFactory authenticationRequestFactory)Construct aSaml2WebSsoAuthenticationRequestFilterwith the provided parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voiddoFilterInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain)voidsetAuthenticationRequestFactory(Saml2AuthenticationRequestFactory authenticationRequestFactory)Deprecated.use the constructor insteadvoidsetAuthenticationRequestRepository(Saml2AuthenticationRequestRepository<AbstractSaml2AuthenticationRequest> authenticationRequestRepository)Use the givenSaml2AuthenticationRequestRepositoryto save the authentication requestvoidsetRedirectMatcher(org.springframework.security.web.util.matcher.RequestMatcher redirectMatcher)Deprecated.Configure the request matcher in an implementation ofSaml2AuthenticationRequestResolverinstead-
Methods inherited from class org.springframework.web.filter.OncePerRequestFilter
doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatch
-
-
-
-
Constructor Detail
-
Saml2WebSsoAuthenticationRequestFilter
@Deprecated public Saml2WebSsoAuthenticationRequestFilter(RelyingPartyRegistrationRepository relyingPartyRegistrationRepository)
Deprecated.use the constructor that takes aSaml2AuthenticationRequestFactoryConstruct aSaml2WebSsoAuthenticationRequestFilterwith the provided parameters- Parameters:
relyingPartyRegistrationRepository- a repository for relying party configurations
-
Saml2WebSsoAuthenticationRequestFilter
public Saml2WebSsoAuthenticationRequestFilter(Saml2AuthenticationRequestContextResolver authenticationRequestContextResolver, Saml2AuthenticationRequestFactory authenticationRequestFactory)
Construct aSaml2WebSsoAuthenticationRequestFilterwith the provided parameters- Parameters:
authenticationRequestContextResolver- a strategy for formulating aSaml2AuthenticationRequestContextauthenticationRequestFactory- strategy for formulating a <saml2:AuthnRequest>- Since:
- 5.4
-
Saml2WebSsoAuthenticationRequestFilter
public Saml2WebSsoAuthenticationRequestFilter(Saml2AuthenticationRequestResolver authenticationRequestResolver)
Construct aSaml2WebSsoAuthenticationRequestFilterwith the strategy for resolving theAuthnRequest- Parameters:
authenticationRequestResolver- the strategy for resolving theAuthnRequest- Since:
- 5.7
-
-
Method Detail
-
setAuthenticationRequestFactory
@Deprecated public void setAuthenticationRequestFactory(Saml2AuthenticationRequestFactory authenticationRequestFactory)
Deprecated.use the constructor insteadUse the givenSaml2AuthenticationRequestFactoryfor formulating the SAML 2.0 AuthnRequest- Parameters:
authenticationRequestFactory- theSaml2AuthenticationRequestFactoryto use
-
setRedirectMatcher
@Deprecated public void setRedirectMatcher(org.springframework.security.web.util.matcher.RequestMatcher redirectMatcher)
Deprecated.Configure the request matcher in an implementation ofSaml2AuthenticationRequestResolverinsteadUse the givenRequestMatcherthat activates this filter for a given request- Parameters:
redirectMatcher- theRequestMatcherto use
-
setAuthenticationRequestRepository
public void setAuthenticationRequestRepository(Saml2AuthenticationRequestRepository<AbstractSaml2AuthenticationRequest> authenticationRequestRepository)
Use the givenSaml2AuthenticationRequestRepositoryto save the authentication request- Parameters:
authenticationRequestRepository- theSaml2AuthenticationRequestRepositoryto use- Since:
- 5.6
-
doFilterInternal
protected void doFilterInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain) throws javax.servlet.ServletException, java.io.IOException- Specified by:
doFilterInternalin classorg.springframework.web.filter.OncePerRequestFilter- Throws:
javax.servlet.ServletExceptionjava.io.IOException
-
-