Advertisement
Guest User

Untitled

a guest
Oct 8th, 2015
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. @Configuration
  2. @EnableWebMvcSecurity
  3. @EnableGlobalMethodSecurity(prePostEnabled = true)
  4. class SecurityConfig extends WebSecurityConfigurerAdapter{
  5.  
  6. @Override
  7. protected void configure(AuthenticationManagerBuilder auth) throws Exception {
  8. auth.authenticationProvider(tokenAP());
  9. auth.authenticationProvider(usernameAndPasswordAP());
  10. auth.userDetailsService(getUserDetailsService());
  11. }
  12.  
  13. @Autowired
  14. public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
  15. auth.authenticationProvider(tokenAP())
  16. .authenticationProvider(usernameAndPasswordAP())
  17. .userDetailsService(getUserDetailsService());
  18. }
  19.  
  20. @Order(SecurityProperties.ACCESS_OVERRIDE_ORDER)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement