Jhipster和Spring安全性-添加身份验证提供程序,保留活动的默认JDBC身份验证模式
我已将自定义LDAP身份验证提供程序机制添加到jHipster应用程序中。无需将任何Jhipster和Spring安全性-添加身份验证提供程序,保留活动的默认JDBC身份验证模式,spring,authentication,spring-security,ldap,jhipster,Spring,Authentication,Spring Security,Ldap,Jhipster,我已将自定义LDAP身份验证提供程序机制添加到jHipster应用程序中。无需将任何configureGlobal(authenticationmanagerbuilderauth)或configureGlobal(authenticationmanagerbuilderauth)方法插入SecurityConfiguration类,但在自定义AuthenticationProvider实现上添加@Component注释,新的身份验证工作正常,但是,我丢失了数据库中用户的默认身份验证 我尝试在s
configureGlobal(authenticationmanagerbuilderauth)
或configureGlobal(authenticationmanagerbuilderauth)
方法插入SecurityConfiguration
类,但在自定义AuthenticationProvider
实现上添加@Component
注释,新的身份验证工作正常,但是,我丢失了数据库中用户的默认身份验证
我尝试在securityConfiguration
上添加以下内容:
@Inject
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
super.configure(auth);
auth.authenticationProvider(aDauthenticationProvider);
}
但结果是一样的,我丢失了数据库身份验证
如何将默认身份验证机制添加到AuthenticationManagerBuilder的提供程序列表中
谢谢我找到了解决方案,如果有人有我同样的问题,我会写这篇文章 在GlobalConfigure方法上添加以下代码行就足够了:
auth.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder());
将预定义的JDBC身份验证方法添加到身份验证提供程序列表中