@EnableGlobalMethodSecurity(prePostEnabled=true)
public class NacosAuthConfig
extends org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
| 构造器和说明 |
|---|
NacosAuthConfig(org.springframework.core.env.Environment env,
TokenManagerDelegate tokenProvider,
com.alibaba.nacos.auth.config.AuthConfigs authConfigs,
NacosUserDetailsServiceImpl userDetailsService,
org.springframework.beans.factory.ObjectProvider<LdapAuthenticationProvider> ldapAuthenticationProvider,
com.alibaba.nacos.core.code.ControllerMethodsCache methodsCache) |
| 限定符和类型 | 方法和说明 |
|---|---|
IAuthenticationManager |
authenticationManager(org.springframework.beans.factory.ObjectProvider<LdapAuthenticationManager> ldapAuthenticatoinManagerObjectProvider,
org.springframework.beans.factory.ObjectProvider<DefaultAuthenticationManager> defaultAuthenticationManagers,
com.alibaba.nacos.auth.config.AuthConfigs authConfigs) |
org.springframework.security.authentication.AuthenticationManager |
authenticationManagerBean() |
protected void |
configure(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth) |
protected void |
configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) |
void |
configure(org.springframework.security.config.annotation.web.builders.WebSecurity web) |
IAuthenticationManager |
defaultAuthenticationManager(NacosUserDetailsServiceImpl userDetailsService,
TokenManagerDelegate jwtTokenManager,
NacosRoleServiceImpl roleService) |
void |
init()
Init.
|
org.springframework.security.crypto.password.PasswordEncoder |
passwordEncoder() |
authenticationManager, getApplicationContext, getHttp, init, setApplicationContext, setAuthenticationConfiguration, setContentNegotationStrategy, setObjectPostProcessor, setTrustResolver, userDetailsService, userDetailsServiceBeanpublic NacosAuthConfig(org.springframework.core.env.Environment env,
TokenManagerDelegate tokenProvider,
com.alibaba.nacos.auth.config.AuthConfigs authConfigs,
NacosUserDetailsServiceImpl userDetailsService,
org.springframework.beans.factory.ObjectProvider<LdapAuthenticationProvider> ldapAuthenticationProvider,
com.alibaba.nacos.core.code.ControllerMethodsCache methodsCache)
@PostConstruct public void init()
@Bean(name="org.springframework.security.authenticationManager")
public org.springframework.security.authentication.AuthenticationManager authenticationManagerBean()
throws Exception
authenticationManagerBean 在类中 org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapterExceptionpublic void configure(org.springframework.security.config.annotation.web.builders.WebSecurity web)
configure 在接口中 org.springframework.security.config.annotation.SecurityConfigurer<javax.servlet.Filter,org.springframework.security.config.annotation.web.builders.WebSecurity>configure 在类中 org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapterprotected void configure(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth)
throws Exception
configure 在类中 org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapterExceptionprotected void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
throws Exception
configure 在类中 org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapterException@Bean public org.springframework.security.crypto.password.PasswordEncoder passwordEncoder()
@Bean @Primary public IAuthenticationManager authenticationManager(org.springframework.beans.factory.ObjectProvider<LdapAuthenticationManager> ldapAuthenticatoinManagerObjectProvider, org.springframework.beans.factory.ObjectProvider<DefaultAuthenticationManager> defaultAuthenticationManagers, com.alibaba.nacos.auth.config.AuthConfigs authConfigs)
@Bean public IAuthenticationManager defaultAuthenticationManager(NacosUserDetailsServiceImpl userDetailsService, TokenManagerDelegate jwtTokenManager, NacosRoleServiceImpl roleService)
Copyright © 2018–2023 Alibaba Group. All rights reserved.