public final class ResourceServerSecurityConfigurer
extends org.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,org.springframework.security.config.annotation.web.builders.HttpSecurity>
Constructor and Description |
---|
ResourceServerSecurityConfigurer() |
Modifier and Type | Method and Description |
---|---|
ResourceServerSecurityConfigurer |
accessDeniedHandler(org.springframework.security.web.access.AccessDeniedHandler accessDeniedHandler) |
ResourceServerSecurityConfigurer |
authenticationDetailsSource(org.springframework.security.authentication.AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,?> authenticationDetailsSource)
Sets a custom
AuthenticationDetailsSource to use as a source
of authentication details. |
ResourceServerSecurityConfigurer |
authenticationEntryPoint(org.springframework.security.web.AuthenticationEntryPoint authenticationEntryPoint) |
ResourceServerSecurityConfigurer |
authenticationManager(org.springframework.security.authentication.AuthenticationManager authenticationManager) |
void |
configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) |
ResourceServerSecurityConfigurer |
eventPublisher(org.springframework.security.authentication.AuthenticationEventPublisher eventPublisher) |
ResourceServerSecurityConfigurer |
expressionHandler(org.springframework.security.access.expression.SecurityExpressionHandler<org.springframework.security.web.FilterInvocation> expressionHandler) |
org.springframework.security.web.access.AccessDeniedHandler |
getAccessDeniedHandler() |
TokenStore |
getTokenStore() |
void |
init(org.springframework.security.config.annotation.web.builders.HttpSecurity http) |
ResourceServerSecurityConfigurer |
resourceId(String resourceId) |
ResourceServerSecurityConfigurer |
stateless(boolean stateless)
Flag to indicate that only token-based authentication is allowed on these resources.
|
ResourceServerSecurityConfigurer |
tokenExtractor(TokenExtractor tokenExtractor) |
ResourceServerSecurityConfigurer |
tokenServices(ResourceServerTokenServices tokenServices) |
ResourceServerSecurityConfigurer |
tokenStore(TokenStore tokenStore) |
public TokenStore getTokenStore()
public ResourceServerSecurityConfigurer stateless(boolean stateless)
stateless
- the flag value (default true)public ResourceServerSecurityConfigurer authenticationEntryPoint(org.springframework.security.web.AuthenticationEntryPoint authenticationEntryPoint)
public ResourceServerSecurityConfigurer accessDeniedHandler(org.springframework.security.web.access.AccessDeniedHandler accessDeniedHandler)
public ResourceServerSecurityConfigurer tokenStore(TokenStore tokenStore)
public ResourceServerSecurityConfigurer eventPublisher(org.springframework.security.authentication.AuthenticationEventPublisher eventPublisher)
public ResourceServerSecurityConfigurer expressionHandler(org.springframework.security.access.expression.SecurityExpressionHandler<org.springframework.security.web.FilterInvocation> expressionHandler)
public ResourceServerSecurityConfigurer tokenExtractor(TokenExtractor tokenExtractor)
public ResourceServerSecurityConfigurer authenticationDetailsSource(org.springframework.security.authentication.AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,?> authenticationDetailsSource)
AuthenticationDetailsSource
to use as a source
of authentication details. The default is OAuth2AuthenticationDetailsSource
.authenticationDetailsSource
- the custom AuthenticationDetailsSource
to useResourceServerSecurityConfigurer
for additional customizationpublic ResourceServerSecurityConfigurer authenticationManager(org.springframework.security.authentication.AuthenticationManager authenticationManager)
public ResourceServerSecurityConfigurer tokenServices(ResourceServerTokenServices tokenServices)
public void init(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception
init
in interface org.springframework.security.config.annotation.SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,org.springframework.security.config.annotation.web.builders.HttpSecurity>
init
in class org.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,org.springframework.security.config.annotation.web.builders.HttpSecurity>
Exception
public ResourceServerSecurityConfigurer resourceId(String resourceId)
public void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception
configure
in interface org.springframework.security.config.annotation.SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,org.springframework.security.config.annotation.web.builders.HttpSecurity>
configure
in class org.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,org.springframework.security.config.annotation.web.builders.HttpSecurity>
Exception
public org.springframework.security.web.access.AccessDeniedHandler getAccessDeniedHandler()
Copyright © 2019. All rights reserved.