forked from codesquad-members-2022/airbnb
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: LoginResponse 에 정적팩토리 메서드 추가 (#35)
- Loading branch information
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
BE/src/main/java/org/team4/airbnb/auth/dto/LoginResponse.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,27 @@ | ||
package org.team4.airbnb.auth.dto; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@Builder | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
public class LoginResponse { | ||
|
||
private String accessToken; | ||
private String freshToken; | ||
private String tokenType; | ||
|
||
public static LoginResponse of(String accessToken, String freshToken, String tokenType) { | ||
return LoginResponse.builder() | ||
.accessToken(accessToken) | ||
.freshToken(freshToken) | ||
.tokenType(tokenType) | ||
.build(); | ||
} | ||
|
||
} |