Skip to content

Commit

Permalink
[feat] #8 naver 소셜 로그인 dto 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
RyuKwanKon committed Sep 7, 2023
1 parent 77f8468 commit 66d6e29
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.kusithm.hdmedi_server.domain.user.dto.request;

import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;

@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
public class UserAuthRequestDto {
private String platform;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.kusithm.hdmedi_server.domain.user.dto.response;

import com.kusithm.hdmedi_server.domain.user.domain.User;
import com.kusithm.hdmedi_server.global.config.jwt.Token;
import lombok.Builder;
import lombok.Getter;

@Builder
@Getter
public class UserAuthResponseDto {
private String accessToken;
private String refreshToken;
private Long userId;

public static UserAuthResponseDto of(Token token, User user) {
return UserAuthResponseDto.builder()
.accessToken(token.getAccessToken())
.refreshToken(token.getRefreshToken())
.userId(user.getId())
.build();
}
}

0 comments on commit 66d6e29

Please sign in to comment.