File tree Expand file tree Collapse file tree
src/main/java/net/developerden/backend/security Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package net .developerden .backend .security ;
22
3- import org .springframework .http .HttpStatus ;
4- import org .springframework .security .config .Customizer ;
53import org .springframework .security .config .annotation .web .builders .HttpSecurity ;
64import org .springframework .security .config .annotation .web .configuration .EnableWebSecurity ;
75import org .springframework .security .config .annotation .web .configuration .WebSecurityConfigurerAdapter ;
8- import org .springframework .security .oauth2 .core .user .DefaultOAuth2User ;
9- import org .springframework .security .web .authentication .HttpStatusEntryPoint ;
10-
11- import java .util .Collections ;
126
137@ EnableWebSecurity
148public class OAuth2LoginConfig extends WebSecurityConfigurerAdapter {
159 @ Override
1610 protected void configure (HttpSecurity http ) throws Exception {
1711 http .authorizeRequests (a ->
18- a .antMatchers ("/" , "/error" ). permitAll ()
19- .anyRequest ().authenticated ()
12+ a .antMatchers ("/panel" ). authenticated ()
13+ .anyRequest ().permitAll ()
2014 )
2115
2216 .oauth2Login ()
You can’t perform that action at this time.
0 commit comments