Class PublicKeyCredentialRequestOptionsFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
org.springframework.security.web.webauthn.authentication.PublicKeyCredentialRequestOptionsFilter
- 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 PublicKeyCredentialRequestOptionsFilter
extends org.springframework.web.filter.OncePerRequestFilter
- Since:
- 6.4
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doFilterInternal
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain filterChain) void
setConverter
(org.springframework.http.converter.HttpMessageConverter<Object> converter) Sets theHttpMessageConverter
to use.void
setRequestMatcher
(RequestMatcher requestMatcher) Sets theRequestMatcher
used to trigger this filter.void
setRequestOptionsRepository
(PublicKeyCredentialRequestOptionsRepository requestOptionsRepository) Sets thePublicKeyCredentialRequestOptionsRepository
to use.void
setSecurityContextHolderStrategy
(SecurityContextHolderStrategy securityContextHolderStrategy) Sets theSecurityContextHolderStrategy
to use.Methods 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
-
PublicKeyCredentialRequestOptionsFilter
Creates a new instance with the providedWebAuthnRelyingPartyOperations
.- Parameters:
rpOptions
- theWebAuthnRelyingPartyOperations
to use. Cannot be null.
-
-
Method Details
-
setRequestMatcher
Sets theRequestMatcher
used to trigger this filter. By default, theRequestMatcher
isPOST /webauthn/authenticate/options
.- Parameters:
requestMatcher
- theRequestMatcher
to use- Since:
- 6.5
-
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
-
setRequestOptionsRepository
public void setRequestOptionsRepository(PublicKeyCredentialRequestOptionsRepository requestOptionsRepository) Sets thePublicKeyCredentialRequestOptionsRepository
to use.- Parameters:
requestOptionsRepository
- thePublicKeyCredentialRequestOptionsRepository
to use. Cannot be null.
-
setConverter
Sets theHttpMessageConverter
to use.- Parameters:
converter
- theHttpMessageConverter
to use. Cannot be null.
-
setSecurityContextHolderStrategy
public void setSecurityContextHolderStrategy(SecurityContextHolderStrategy securityContextHolderStrategy) Sets theSecurityContextHolderStrategy
to use.- Parameters:
securityContextHolderStrategy
- theSecurityContextHolderStrategy
to use. Cannot be null.
-