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:
jakarta.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
public class Saml2WebSsoAuthenticationRequestFilter
extends org.springframework.web.filter.OncePerRequestFilter
This
Filter
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 the URI
/saml2/authenticate/{registrationId}
. The URI
template variable
{registrationId}
represents the
registration identifier
of the
relying party that is used for initiating the authentication request.
- Since:
- 5.2
-
Field Summary
Fields inherited from class org.springframework.web.filter.OncePerRequestFilter
ALREADY_FILTERED_SUFFIX
Fields inherited from class org.springframework.web.filter.GenericFilterBean
logger
-
Constructor Summary
ConstructorDescriptionSaml2WebSsoAuthenticationRequestFilter
(Saml2AuthenticationRequestResolver authenticationRequestResolver) Construct aSaml2WebSsoAuthenticationRequestFilter
with the strategy for resolving theAuthnRequest
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doFilterInternal
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain filterChain) void
setAuthenticationRequestRepository
(Saml2AuthenticationRequestRepository<AbstractSaml2AuthenticationRequest> authenticationRequestRepository) Use the givenSaml2AuthenticationRequestRepository
to save the authentication requestMethods inherited from class org.springframework.web.filter.OncePerRequestFilter
doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatch
Methods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
-
Constructor Details
-
Saml2WebSsoAuthenticationRequestFilter
public Saml2WebSsoAuthenticationRequestFilter(Saml2AuthenticationRequestResolver authenticationRequestResolver) Construct aSaml2WebSsoAuthenticationRequestFilter
with the strategy for resolving theAuthnRequest
- Parameters:
authenticationRequestResolver
- the strategy for resolving theAuthnRequest
- Since:
- 5.7
-
-
Method Details
-
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(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain filterChain) throws jakarta.servlet.ServletException, IOException - Specified by:
doFilterInternal
in classorg.springframework.web.filter.OncePerRequestFilter
- Throws:
jakarta.servlet.ServletException
IOException
-