Skip to content

Commit

Permalink
Merge pull request #62 from wafflestudio/feat/socialLogin
Browse files Browse the repository at this point in the history
Session management to be stateless
  • Loading branch information
jafacode authored Jan 23, 2025
2 parents dad97dc + cd3a9f1 commit fec0247
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/kotlin/com/toyProject7/karrot/SecurityConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import org.springframework.context.annotation.Configuration
import org.springframework.http.HttpStatus
import org.springframework.security.config.annotation.web.builders.HttpSecurity
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity
import org.springframework.security.config.http.SessionCreationPolicy
import org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter
import org.springframework.security.web.SecurityFilterChain
import org.springframework.security.web.authentication.HttpStatusEntryPoint
Expand Down Expand Up @@ -44,6 +45,9 @@ class SecurityConfig(
.exceptionHandling { exceptionHandling ->
exceptionHandling.authenticationEntryPoint(HttpStatusEntryPoint(HttpStatus.UNAUTHORIZED))
}
.sessionManagement { sessionManagement ->
sessionManagement.sessionCreationPolicy(SessionCreationPolicy.STATELESS)
}
.oauth2Login { oauth2login ->
oauth2login
.userInfoEndpoint { userInfo ->
Expand Down

0 comments on commit fec0247

Please sign in to comment.