diff --git a/src/main/kotlin/com/example/v1oauthauthorizationservice/infrastructure/configuration/security/SecurityConfiguration.kt b/src/main/kotlin/com/example/v1oauthauthorizationservice/infrastructure/configuration/security/SecurityConfiguration.kt index 4922033..75bb929 100644 --- a/src/main/kotlin/com/example/v1oauthauthorizationservice/infrastructure/configuration/security/SecurityConfiguration.kt +++ b/src/main/kotlin/com/example/v1oauthauthorizationservice/infrastructure/configuration/security/SecurityConfiguration.kt @@ -53,10 +53,10 @@ class SecurityConfiguration( .requestMatchers(HttpMethod.GET, "/oauth2/authorize").authenticated() .requestMatchers(HttpMethod.GET, "/oauth2/userinfo").authenticated() .requestMatchers(HttpMethod.POST, "/oauth2/user").permitAll() - .requestMatchers(HttpMethod.POST, "/oauth2/user/login").permitAll() - .requestMatchers(HttpMethod.POST, "/oauth2/user/reissue").authenticated() - .requestMatchers(HttpMethod.PUT, "/oauth2/user/update").authenticated() - .requestMatchers(HttpMethod.GET, "/oauth2/user/myInfo").authenticated() + .requestMatchers(HttpMethod.POST, "/oauth2/login").permitAll() + .requestMatchers(HttpMethod.POST, "/oauth2/reissue").authenticated() + .requestMatchers(HttpMethod.PUT, "/oauth2/update").authenticated() + .requestMatchers(HttpMethod.GET, "/oauth2/myInfo").authenticated() .anyRequest().authenticated() .and() diff --git a/src/main/kotlin/com/example/v1oauthauthorizationservice/infrastructure/user/presentation/UserController.kt b/src/main/kotlin/com/example/v1oauthauthorizationservice/infrastructure/user/presentation/UserController.kt index d7274c1..01c227c 100644 --- a/src/main/kotlin/com/example/v1oauthauthorizationservice/infrastructure/user/presentation/UserController.kt +++ b/src/main/kotlin/com/example/v1oauthauthorizationservice/infrastructure/user/presentation/UserController.kt @@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.* @Validated @RestController -@RequestMapping("/oauth2/user") +@RequestMapping("/oauth2") class UserController( private val userService: UserService ) { @@ -35,7 +35,7 @@ class UserController( req: LoginRequest ): TokenResponse = userService.login(req) - @PostMapping + @PostMapping("/user") @ResponseStatus(HttpStatus.CREATED) fun signup( @RequestBody @Valid diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index dd66b79..f9fdc83 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -7,6 +7,10 @@ spring: property-naming-strategy: SNAKE_CASE date-format: yyyy-MM-dd'T'HH:mm:ss time-zone: Asia/Seoul + serialization: + write-dates-as-timestamps: false + deserialization: + adjust-dates-to-context-time-zone: true application: name: v1-oauth-service config: @@ -27,3 +31,7 @@ oauth: server: shutdown: graceful +jwt: + secret-key: ${JWT_SECRET} + access-exp: ${ACCESS_EXP} + refresh-exp: ${REFRESH_EXP}