-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
48 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
api/src/main/kotlin/com/backgu/amaker/security/config/JwtSecurityConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
package com.backgu.amaker.security.config | ||
|
||
import com.backgu.amaker.security.JwtAccessDeniedHandler | ||
import com.backgu.amaker.security.JwtAuthenticationProvider | ||
import com.backgu.amaker.security.JwtAuthenticationTokenFilter | ||
import com.backgu.amaker.security.jwt.service.JwtService | ||
import com.backgu.amaker.security.filter.JwtAuthenticationTokenFilter | ||
import com.backgu.amaker.security.handler.AuthAccessDeniedHandler | ||
import com.backgu.amaker.security.jwt.component.JwtComponent | ||
import com.backgu.amaker.user.service.UserService | ||
import org.springframework.context.annotation.Bean | ||
import org.springframework.context.annotation.Configuration | ||
|
||
@Configuration | ||
class JwtSecurityConfig( | ||
private var jwtService: JwtService, | ||
private var jwtComponent: JwtComponent, | ||
private var userService: UserService, | ||
) { | ||
@Bean | ||
fun jwtAuthenticationFilter(): JwtAuthenticationTokenFilter = JwtAuthenticationTokenFilter(jwtService) | ||
fun jwtAuthenticationFilter(): JwtAuthenticationTokenFilter = JwtAuthenticationTokenFilter(jwtComponent) | ||
|
||
@Bean | ||
fun jwtAuthenticationProvider(): JwtAuthenticationProvider = JwtAuthenticationProvider(userService) | ||
|
||
@Bean | ||
fun jwtAccessDeniedHandler(): JwtAccessDeniedHandler = JwtAccessDeniedHandler() | ||
fun jwtAccessDeniedHandler(): AuthAccessDeniedHandler = AuthAccessDeniedHandler() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...amaker/security/jwt/service/JwtService.kt → ...er/security/jwt/component/JwtComponent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters