I am trying to add Spring security to my project. I have custom login logic - advanced LDAP with custom encoding
@Configuration
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
//TODO
}
@Override
public void configure(AuthenticationManagerBuilder auth) throws Exception {
//TODO
}
private boolean login(String login, String pass) {
// custom login logic....
return loginHandler.login(login, pass);
}
}
Is there way, how to add login() method into configure method ?
It's just Spring Security configuration class. It shouldn't have a login() method in it, it should store the configuration only.
Probably you would like to have something like this: https://spring.io/guides/gs/authenticating-ldap/ - WebSecurityConfig should be good example.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.