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.OncePerRequestFilter
ThisFilter
formulates 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
Filter
responds to authentication requests at theURI
/saml2/authenticate/{registrationId}
. TheURI
template variable{registrationId}
represents theregistration identifier
of 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 aSaml2AuthenticationRequestFactory
Saml2WebSsoAuthenticationRequestFilter(Saml2AuthenticationRequestResolver authenticationRequestResolver)
Construct aSaml2WebSsoAuthenticationRequestFilter
with the strategy for resolving theAuthnRequest
Saml2WebSsoAuthenticationRequestFilter(Saml2AuthenticationRequestContextResolver authenticationRequestContextResolver, Saml2AuthenticationRequestFactory authenticationRequestFactory)
Construct aSaml2WebSsoAuthenticationRequestFilter
with the provided parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
doFilterInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain)
void
setAuthenticationRequestFactory(Saml2AuthenticationRequestFactory authenticationRequestFactory)
Deprecated.use the constructor insteadvoid
setAuthenticationRequestRepository(Saml2AuthenticationRequestRepository<AbstractSaml2AuthenticationRequest> authenticationRequestRepository)
Use the givenSaml2AuthenticationRequestRepository
to save the authentication requestvoid
setRedirectMatcher(RequestMatcher redirectMatcher)
Deprecated.Configure the request matcher in an implementation ofSaml2AuthenticationRequestResolver
instead-
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 aSaml2AuthenticationRequestFactory
Construct aSaml2WebSsoAuthenticationRequestFilter
with the provided parameters- Parameters:
relyingPartyRegistrationRepository
- a repository for relying party configurations
-
Saml2WebSsoAuthenticationRequestFilter
public Saml2WebSsoAuthenticationRequestFilter(Saml2AuthenticationRequestContextResolver authenticationRequestContextResolver, Saml2AuthenticationRequestFactory authenticationRequestFactory)
Construct aSaml2WebSsoAuthenticationRequestFilter
with the provided parameters- Parameters:
authenticationRequestContextResolver
- a strategy for formulating aSaml2AuthenticationRequestContext
authenticationRequestFactory
- strategy for formulating a <saml2:AuthnRequest>- Since:
- 5.4
-
Saml2WebSsoAuthenticationRequestFilter
public Saml2WebSsoAuthenticationRequestFilter(Saml2AuthenticationRequestResolver authenticationRequestResolver)
Construct aSaml2WebSsoAuthenticationRequestFilter
with 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 givenSaml2AuthenticationRequestFactory
for formulating the SAML 2.0 AuthnRequest- Parameters:
authenticationRequestFactory
- theSaml2AuthenticationRequestFactory
to use
-
setRedirectMatcher
@Deprecated public void setRedirectMatcher(RequestMatcher redirectMatcher)
Deprecated.Configure the request matcher in an implementation ofSaml2AuthenticationRequestResolver
insteadUse the givenRequestMatcher
that activates this filter for a given request- Parameters:
redirectMatcher
- theRequestMatcher
to use
-
setAuthenticationRequestRepository
public void setAuthenticationRequestRepository(Saml2AuthenticationRequestRepository<AbstractSaml2AuthenticationRequest> authenticationRequestRepository)
Use the givenSaml2AuthenticationRequestRepository
to save the authentication request- Parameters:
authenticationRequestRepository
- theSaml2AuthenticationRequestRepository
to 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:
doFilterInternal
in classorg.springframework.web.filter.OncePerRequestFilter
- Throws:
javax.servlet.ServletException
java.io.IOException
-
-