[英]Spring security - configuring classes | AuthenticationManagerBuilder
I am trying to configure class that extends WebSecurityConfigurerAdapter. 我正在尝试配置扩展WebSecurityConfigurerAdapter的类。
class SecurityConfig extends WebSecurityConfigurerAdapter {
}
and in the class I have such defined function: 在课堂上我有这样定义的功能:
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception
{
auth.inMemoryAuthentication()
.withUser("poef").password("fump")
.roles("ACTUATOR ");
}
My source is HERE My problem in understanding is in the beginning of this statement: 我的消息来源是这里。我理解的问题是在此声明的开头:
.withUser("poef")
I don't see in doccumentation this function(withUser). 我在文档中没有看到此功能(withUser)。 Where it does come from the following statements.
它来自以下语句。
The method auth.inMemoryAuthentication()
returns an InMemoryUserDetailsManagerConfigurer
, which, in turn, derives from UserDetailsManagerConfigurer that provides the withUser()
method. 方法
auth.inMemoryAuthentication()
返回一个InMemoryUserDetailsManagerConfigurer
,后者又从提供withUser()
方法的UserDetailsManagerConfigurer派生。
The withUser()
returns a UserDetailsManagerConfigurer.UserDetailsBuilder
that provides the password(..)
method. withUser()
返回提供password(..)
方法的UserDetailsManagerConfigurer.UserDetailsBuilder
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.