Skip to content

Commit

Permalink
Merge pull request #77 from mash-up-kr/yaeoni/revert-filter
Browse files Browse the repository at this point in the history
fix; 인증 필터 다시 넣어요
  • Loading branch information
yaeoni authored Aug 7, 2024
2 parents a25ff8f + 6b1c130 commit 61f6cf7
Showing 1 changed file with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.mashup.dojo.config.security

import com.mashup.dojo.service.MemberService
import org.springframework.boot.web.servlet.FilterRegistrationBean
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration

Expand All @@ -8,16 +10,15 @@ class WebSecurityConfiguration {
@Bean
fun jwtTokenService() = JwtTokenService("dojo-secret-dojo-secret-dojo-secret")

// 임시 제거
// @Bean
// fun tokenBasedAuthenticationFilter(
// memberService: MemberService,
// jwtTokenService: JwtTokenService,
// ): FilterRegistrationBean<MemberAuthTokenAuthenticationFilter> {
// val authenticationProvider = MemberAuthTokenAuthenticationProvider(jwtTokenService, memberService)
//
// val filter = MemberAuthTokenAuthenticationFilter(authenticationProvider)
//
// return FilterRegistrationBean(filter).apply {}
// }
@Bean
fun tokenBasedAuthenticationFilter(
memberService: MemberService,
jwtTokenService: JwtTokenService,
): FilterRegistrationBean<MemberAuthTokenAuthenticationFilter> {
val authenticationProvider = MemberAuthTokenAuthenticationProvider(jwtTokenService, memberService)

val filter = MemberAuthTokenAuthenticationFilter(authenticationProvider)

return FilterRegistrationBean(filter).apply {}
}
}

0 comments on commit 61f6cf7

Please sign in to comment.