Skip to content

Commit

Permalink
update :: update endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
4mjeo committed Mar 13, 2024
1 parent 728296a commit 1e1dfbc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.*

@Validated
@RestController
@RequestMapping("/oauth2/user")
@RequestMapping("/oauth2")
class UserController(
private val userService: UserService
) {
Expand All @@ -35,7 +35,7 @@ class UserController(
req: LoginRequest
): TokenResponse = userService.login(req)

@PostMapping
@PostMapping("/user")
@ResponseStatus(HttpStatus.CREATED)
fun signup(
@RequestBody @Valid
Expand Down
8 changes: 8 additions & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -27,3 +31,7 @@ oauth:

server:
shutdown: graceful
jwt:
secret-key: ${JWT_SECRET}
access-exp: ${ACCESS_EXP}
refresh-exp: ${REFRESH_EXP}

0 comments on commit 1e1dfbc

Please sign in to comment.