Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. @Override
  2. protected void configure(HttpSecurity http) throws Exception {
  3. http
  4. .authorizeRequests()
  5. .antMatchers("/login**").permitAll()
  6. .antMatchers("/profile/**").fullyAuthenticated()
  7. .antMatchers("/").permitAll()
  8. .and()
  9. .formLogin()
  10. .loginPage("/login")
  11. .failureUrl("/login?error")
  12. .permitAll()
  13. .and()
  14. .logout()
  15. .invalidateHttpSession(true)
  16. .deleteCookies("JSESSIONID")
  17. .permitAll();
  18. }
  19.  
  20.  
  21.  
  22.  
  23. @Override protected void configure(AuthenticationManagerBuilder auth) throws
  24. Exception {
  25. auth.ldapAuthentication().userDnPatterns("sAMAccountName={0}")
  26. .url(
  27. "ldap://url:389/DC=dmc,DC=local"
  28. ); }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement