Class KeycloakWebSecurityConfigurerAdapter
java.lang.Object
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
org.keycloak.adapters.springsecurity.config.KeycloakWebSecurityConfigurerAdapter
- All Implemented Interfaces:
org.springframework.security.config.annotation.SecurityConfigurer<javax.servlet.Filter,
,org.springframework.security.config.annotation.web.builders.WebSecurity> org.springframework.security.config.annotation.web.WebSecurityConfigurer<org.springframework.security.config.annotation.web.builders.WebSecurity>
public abstract class KeycloakWebSecurityConfigurerAdapter
extends org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
implements org.springframework.security.config.annotation.web.WebSecurityConfigurer<org.springframework.security.config.annotation.web.builders.WebSecurity>
Provides a convenient base class for creating a
WebSecurityConfigurer
instance secured by Keycloak. This implementation allows customization by overriding methods.- Version:
- $Revision: 1 $
- Author:
- Scott Rossillo
- See Also:
-
EnableWebSecurity
EnableWebMvcSecurity
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected AdapterDeploymentContext
protected org.springframework.security.web.AuthenticationEntryPoint
protected void
configure
(org.springframework.security.config.annotation.web.builders.HttpSecurity http) protected HttpSessionManager
protected KeycloakAuthenticatedActionsFilter
protected KeycloakAuthenticationProcessingFilter
protected KeycloakAuthenticationProvider
protected KeycloakCsrfRequestMatcher
protected KeycloakLogoutHandler
protected KeycloakPreAuthActionsFilter
protected KeycloakSecurityContextRequestFilter
protected abstract org.springframework.security.web.authentication.session.SessionAuthenticationStrategy
Methods inherited from class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
authenticationManager, authenticationManagerBean, configure, configure, getApplicationContext, getHttp, init, setApplicationContext, setAuthenticationConfiguration, setContentNegotationStrategy, setObjectPostProcessor, setTrustResolver, userDetailsService, userDetailsServiceBean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.security.config.annotation.SecurityConfigurer
configure, init
-
Constructor Details
-
KeycloakWebSecurityConfigurerAdapter
public KeycloakWebSecurityConfigurerAdapter()
-
-
Method Details
-
adapterDeploymentContext
- Throws:
Exception
-
authenticationEntryPoint
protected org.springframework.security.web.AuthenticationEntryPoint authenticationEntryPoint() throws Exception- Throws:
Exception
-
keycloakAuthenticationProvider
-
keycloakAuthenticationProcessingFilter
@Bean protected KeycloakAuthenticationProcessingFilter keycloakAuthenticationProcessingFilter() throws Exception- Throws:
Exception
-
keycloakPreAuthActionsFilter
-
keycloakCsrfRequestMatcher
-
httpSessionManager
-
keycloakLogoutHandler
- Throws:
Exception
-
sessionAuthenticationStrategy
protected abstract org.springframework.security.web.authentication.session.SessionAuthenticationStrategy sessionAuthenticationStrategy() -
configure
protected void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception - Overrides:
configure
in classorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
- Throws:
Exception
-
keycloakSecurityContextRequestFilter
-
keycloakAuthenticatedActionsRequestFilter
-