类 NacosAuthConfig
- java.lang.Object
-
- org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
-
- com.alibaba.nacos.plugin.auth.impl.NacosAuthConfig
-
- 所有已实现的接口:
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>
@EnableGlobalMethodSecurity(prePostEnabled=true) public class NacosAuthConfig extends org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapterSpring security config.- 作者:
- Nacos
-
-
字段概要
字段 修饰符和类型 字段 说明 private com.alibaba.nacos.auth.config.AuthConfigsauthConfigsprivate static java.lang.StringDEFAULT_ALL_PATH_PATTERNprivate org.springframework.core.env.Environmentenvprivate LdapAuthenticationProviderldapAuthenticationProviderprivate static java.lang.StringLOGIN_ENTRY_POINTprivate com.alibaba.nacos.core.code.ControllerMethodsCachemethodsCacheprivate static java.lang.StringPROPERTY_IGNORE_URLSprivate static java.lang.StringSECURITY_IGNORE_URLS_SPILT_CHARprivate static java.lang.StringTOKEN_BASED_AUTH_ENTRY_POINTprivate TokenManagerDelegatetokenProviderprivate NacosUserDetailsServiceImpluserDetailsService
-
构造器概要
构造器 构造器 说明 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)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 IAuthenticationManagerauthenticationManager(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.AuthenticationManagerauthenticationManagerBean()protected voidconfigure(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth)protected voidconfigure(org.springframework.security.config.annotation.web.builders.HttpSecurity http)voidconfigure(org.springframework.security.config.annotation.web.builders.WebSecurity web)IAuthenticationManagerdefaultAuthenticationManager(NacosUserDetailsServiceImpl userDetailsService, TokenManagerDelegate jwtTokenManager, NacosRoleServiceImpl roleService)voidinit()Init.org.springframework.security.crypto.password.PasswordEncoderpasswordEncoder()-
从类继承的方法 org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
authenticationManager, getApplicationContext, getHttp, init, setApplicationContext, setAuthenticationConfiguration, setContentNegotationStrategy, setObjectPostProcessor, setTrustResolver, userDetailsService, userDetailsServiceBean
-
-
-
-
字段详细资料
-
SECURITY_IGNORE_URLS_SPILT_CHAR
private static final java.lang.String SECURITY_IGNORE_URLS_SPILT_CHAR
- 另请参阅:
- 常量字段值
-
LOGIN_ENTRY_POINT
private static final java.lang.String LOGIN_ENTRY_POINT
- 另请参阅:
- 常量字段值
-
TOKEN_BASED_AUTH_ENTRY_POINT
private static final java.lang.String TOKEN_BASED_AUTH_ENTRY_POINT
- 另请参阅:
- 常量字段值
-
DEFAULT_ALL_PATH_PATTERN
private static final java.lang.String DEFAULT_ALL_PATH_PATTERN
- 另请参阅:
- 常量字段值
-
PROPERTY_IGNORE_URLS
private static final java.lang.String PROPERTY_IGNORE_URLS
- 另请参阅:
- 常量字段值
-
env
private final org.springframework.core.env.Environment env
-
tokenProvider
private final TokenManagerDelegate tokenProvider
-
authConfigs
private final com.alibaba.nacos.auth.config.AuthConfigs authConfigs
-
userDetailsService
private final NacosUserDetailsServiceImpl userDetailsService
-
ldapAuthenticationProvider
private final LdapAuthenticationProvider ldapAuthenticationProvider
-
methodsCache
private final com.alibaba.nacos.core.code.ControllerMethodsCache methodsCache
-
-
构造器详细资料
-
NacosAuthConfig
public 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)
-
-
方法详细资料
-
init
@PostConstruct public void init()
Init.
-
authenticationManagerBean
@Bean(name="org.springframework.security.authenticationManager") public org.springframework.security.authentication.AuthenticationManager authenticationManagerBean() throws java.lang.Exception- 覆盖:
authenticationManagerBean在类中org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter- 抛出:
java.lang.Exception
-
configure
public 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.WebSecurityConfigurerAdapter
-
configure
protected void configure(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth) throws java.lang.Exception- 覆盖:
configure在类中org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter- 抛出:
java.lang.Exception
-
configure
protected void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws java.lang.Exception- 覆盖:
configure在类中org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter- 抛出:
java.lang.Exception
-
passwordEncoder
@Bean public org.springframework.security.crypto.password.PasswordEncoder passwordEncoder()
-
authenticationManager
@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)
-
defaultAuthenticationManager
@Bean public IAuthenticationManager defaultAuthenticationManager(NacosUserDetailsServiceImpl userDetailsService, TokenManagerDelegate jwtTokenManager, NacosRoleServiceImpl roleService)
-
-