public class KeycloakAuthenticationProcessingFilter
extends org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
implements org.springframework.context.ApplicationContextAware
| Modifier and Type | Field and Description |
|---|---|
static org.springframework.security.web.util.matcher.RequestMatcher |
DEFAULT_REQUEST_MATCHER
Request matcher that matches requests to the
default login URI
and any request with a Authorization header. |
| Constructor and Description |
|---|
KeycloakAuthenticationProcessingFilter(org.springframework.security.authentication.AuthenticationManager authenticationManager)
Creates a new Keycloak authentication processing filter with given
AuthenticationManager and the
default request matcher. |
KeycloakAuthenticationProcessingFilter(org.springframework.security.authentication.AuthenticationManager authenticationManager,
org.springframework.security.web.util.matcher.RequestMatcher requiresAuthenticationRequestMatcher)
Creates a new Keycloak authentication processing filter with given
AuthenticationManager and
RequestMatcher. |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
org.springframework.security.core.Authentication |
attemptAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
doFilter, getAllowSessionCreation, getAuthenticationManager, getFailureHandler, getFilterProcessesUrl, getRememberMeServices, getSuccessHandler, requiresAuthentication, setAllowSessionCreation, setApplicationEventPublisher, setAuthenticationDetailsSource, setAuthenticationFailureHandler, setAuthenticationManager, setAuthenticationSuccessHandler, setContinueChainBeforeSuccessfulAuthentication, setFilterProcessesUrl, setMessageSource, setRememberMeServices, setRequiresAuthenticationRequestMatcher, setSessionAuthenticationStrategy, successfulAuthentication, successfulAuthentication, unsuccessfulAuthenticationpublic static final org.springframework.security.web.util.matcher.RequestMatcher DEFAULT_REQUEST_MATCHER
default login URI
and any request with a Authorization header.public KeycloakAuthenticationProcessingFilter(org.springframework.security.authentication.AuthenticationManager authenticationManager)
AuthenticationManager and the
default request matcher.authenticationManager - the AuthenticationManager to authenticate requests (cannot be null)DEFAULT_REQUEST_MATCHERpublic KeycloakAuthenticationProcessingFilter(org.springframework.security.authentication.AuthenticationManager authenticationManager,
org.springframework.security.web.util.matcher.RequestMatcher requiresAuthenticationRequestMatcher)
AuthenticationManager and
RequestMatcher.
Note: the given request matcher must support matching the Authorization header if
bearer token authentication is to be accepted.
authenticationManager - the AuthenticationManager to authenticate requests (cannot be null)requiresAuthenticationRequestMatcher - the RequestMatcher used to determine if authentication
is required (cannot be null)RequestHeaderRequestMatcher,
OrRequestMatcherpublic void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilterpublic org.springframework.security.core.Authentication attemptAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws org.springframework.security.core.AuthenticationException,
IOException,
javax.servlet.ServletException
attemptAuthentication in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilterorg.springframework.security.core.AuthenticationExceptionIOExceptionjavax.servlet.ServletExceptionpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionCopyright © 2015 JBoss by Red Hat. All rights reserved.