-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: JsonNaming으로 SnakeCase 전략 적용 - 각 필드마다 적용했던 `@JsonProperty` 어노테이션을 제거해 코드 간략화 * feat: Member 엔티티에 kakaoToken 필드 추가 * feat: 소셜 로그인 시 카카오 토큰을 회원 정보에 저장
- Loading branch information
1 parent
495b4c2
commit 37174e8
Showing
8 changed files
with
54 additions
and
34 deletions.
There are no files selected for viewing
11 changes: 6 additions & 5 deletions
11
src/main/java/econo/buddybridge/auth/dto/kakao/KakaoErrorResponse.java
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,14 +1,15 @@ | ||
package econo.buddybridge.auth.dto.kakao; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.PropertyNamingStrategies; | ||
import com.fasterxml.jackson.databind.annotation.JsonNaming; | ||
import lombok.Builder; | ||
|
||
@Builder | ||
public record KakaoErrorResponse ( | ||
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) | ||
public record KakaoErrorResponse( | ||
String error, | ||
@JsonProperty("error_description") | ||
String errorDescription, | ||
@JsonProperty("error_code") | ||
String errorCode | ||
) { | ||
} | ||
|
||
} |
14 changes: 5 additions & 9 deletions
14
src/main/java/econo/buddybridge/auth/dto/kakao/KakaoInfoResponse.java
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
10 changes: 3 additions & 7 deletions
10
src/main/java/econo/buddybridge/auth/dto/kakao/KakaoTokens.java
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,30 +1,26 @@ | ||
package econo.buddybridge.auth.dto.kakao; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.PropertyNamingStrategies; | ||
import com.fasterxml.jackson.databind.annotation.JsonNaming; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) | ||
public class KakaoTokens { | ||
|
||
@JsonProperty("token_type") | ||
private String tokenType; | ||
|
||
@JsonProperty("access_token") | ||
private String accessToken; | ||
|
||
@JsonProperty("expires_in") | ||
private int expiresIn; | ||
|
||
@JsonProperty("refresh_token") | ||
private String refreshToken; | ||
|
||
@JsonProperty("refresh_token_expires_in") | ||
private int refreshTokenExpiresIn; | ||
|
||
@JsonProperty("scope") | ||
private String scope; | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/econo/buddybridge/auth/dto/kakao/UserInfoWithKakaoToken.java
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package econo.buddybridge.auth.dto.kakao; | ||
|
||
import econo.buddybridge.auth.dto.OAuthInfoResponse; | ||
|
||
public record UserInfoWithKakaoToken( | ||
OAuthInfoResponse info, | ||
String accessToken | ||
) { | ||
|
||
} |
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