daily pastebin goal
80%
SHARE
TWEET

Untitled

a guest Jan 21st, 2019 67 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
  4.                 .cors()
  5.                 .and()
  6.                 .csrf()
  7.                 .disable()
  8.                 .exceptionHandling()
  9.                 .authenticationEntryPoint(unauthorizedHandler)
  10.                 .and()
  11.                 .sessionManagement()
  12.                 .sessionCreationPolicy(SessionCreationPolicy.STATELESS)
  13.                 .and()
  14.                 .authorizeRequests()
  15.                 .antMatchers(WHITELIST)
  16.                 .permitAll()
  17.                 .antMatchers("/api/auth/**")
  18.                 .permitAll()
  19.                 .anyRequest()
  20.                 .authenticated();
  21.  
  22.         // Add our custom JWT security filter
  23.         http.addFilterBefore(jwtAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class);
  24.  
  25.     }
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