Skip to content

Commit

Permalink
Merge pull request #29 from kusitms-28th-Meetup-E/feat/bubble
Browse files Browse the repository at this point in the history
fix : 로그인 시 userId 리턴
  • Loading branch information
seungueonn authored Nov 23, 2023
2 parents a709dc8 + dab82e4 commit 890d51a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class SignInResponse {
private String accessToken;
private String refreshToken;
private Boolean registrationStatus;
private String memberId;

public static SignInResponse from(TokenInfoResponse tokenInfoResponse, RegistrationStatus registrationStatus) {
return SignInResponse.builder()
Expand All @@ -23,4 +24,8 @@ public static SignInResponse from(TokenInfoResponse tokenInfoResponse, Registrat
.registrationStatus(registrationStatus.equals(RegistrationStatus.COMPLETED))
.build();
}

public void updateMemberId(String memberId) {
this.memberId = memberId;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ public class TokenInfoResponse {
private String accessToken;
private String refreshToken;
private Long refreshTokenExpirationTime;
private String memberId;

public static TokenInfoResponse from(String grantType, String accessToken, String refreshToken, Long refreshTokenExpirationTime) {
public static TokenInfoResponse from(String grantType, String accessToken, String refreshToken, Long refreshTokenExpirationTime,String socialId) {
return TokenInfoResponse.builder()
.grantType(grantType)
.accessToken(accessToken)
.refreshToken(refreshToken)
.refreshTokenExpirationTime(refreshTokenExpirationTime)
.memberId(socialId)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public TokenInfoResponse createToken(String socialId, boolean isAdditionalInfoPr
.signWith(SignatureAlgorithm.HS256, secretKey)
.compact();

return TokenInfoResponse.from("Bearer", accessToken, refreshToken, refreshTokenValidityTime);
return TokenInfoResponse.from("Bearer", accessToken, refreshToken, refreshTokenValidityTime,socialId);
}

public boolean verifyToken(String token) {
Expand Down

0 comments on commit 890d51a

Please sign in to comment.