File tree Expand file tree Collapse file tree
src/main/java/com/back/web7_9_codecrete_be/domain/auth/dto/kakao Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package com .back .web7_9_codecrete_be .domain .auth .dto .kakao ;
2+
3+ import com .fasterxml .jackson .annotation .JsonProperty ;
4+ import lombok .Getter ;
5+
6+ @ Getter
7+ public class KakaoTokenResponse {
8+
9+ @ JsonProperty ("access_token" )
10+ private String accessToken ;
11+
12+ @ JsonProperty ("expires_in" )
13+ private int expiresIn ;
14+ }
Original file line number Diff line number Diff line change 1+ package com .back .web7_9_codecrete_be .domain .auth .dto .kakao ;
2+
3+ import lombok .AllArgsConstructor ;
4+ import lombok .Getter ;
5+
6+ @ Getter
7+ @ AllArgsConstructor
8+ public class KakaoUserInfo {
9+ private String socialId ;
10+ private String email ;
11+ private String nickname ;
12+ private String profileImageUrl ;
13+ }
Original file line number Diff line number Diff line change 1+ package com .back .web7_9_codecrete_be .domain .auth .dto .kakao ;
2+
3+ import com .fasterxml .jackson .annotation .JsonProperty ;
4+ import lombok .Getter ;
5+
6+ @ Getter
7+ public class KakaoUserResponse {
8+
9+ private Long id ;
10+
11+ @ JsonProperty ("kakao_account" )
12+ private KakaoAccount kakaoAccount ;
13+
14+ public KakaoUserInfo toUserInfo () {
15+ return new KakaoUserInfo (
16+ String .valueOf (id ),
17+ kakaoAccount .getEmail (),
18+ kakaoAccount .getProfile ().getNickname (),
19+ kakaoAccount .getProfile ().getProfileImageUrl ()
20+ );
21+ }
22+
23+ @ Getter
24+ public static class KakaoAccount {
25+ private String email ;
26+ private Profile profile ;
27+ }
28+
29+ @ Getter
30+ public static class Profile {
31+ private String nickname ;
32+
33+ @ JsonProperty ("profile_image_url" )
34+ private String profileImageUrl ;
35+ }
36+ }
You can’t perform that action at this time.
0 commit comments