SHARE
TWEET

Untitled

a guest Jan 14th, 2020 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     @Override
  2.     protected void configure(HttpSecurity http) throws Exception {
  3.         http.authorizeRequests()
  4.  
  5.                 .antMatchers(HttpMethod.OPTIONS,"/*").permitAll()
  6.                 .antMatchers("/actuator/*").permitAll()
  7.                 .antMatchers("/admin").hasRole("ADMIN")
  8.                 .antMatchers("/user").hasAnyRole("USER", "ADMIN")
  9.                 .antMatchers("/").permitAll()
  10.                 .and().formLogin()
  11.                 .and().csrf().disable()
  12.                 .logout()
  13.                 .invalidateHttpSession(true)
  14.                 .deleteCookies("JSESSIONID");
  15.  
  16.                 http.cors().disable();
  17.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top