Skip to content

Commit

Permalink
[feature] refresh token 추가에 따른 DTO 형식 변경 #59
Browse files Browse the repository at this point in the history
[feature] refresh token 추가에 따른 DTO 형식 변경
  • Loading branch information
yangchef1 authored Jun 16, 2024
2 parents cfc6427 + 95f8b7e commit 2943974
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.sanbosillok.sanbosillokserver.api.auth.dto;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class AccessTokenResponse {
private String accessToken;
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public String getUsername() {
return member.getUsername();
}

public Long getId() { return member.getId(); }

@Override
public boolean isAccountNonExpired() {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

@Data
public class LoginResponse {
private String refreshToken;
private String accessToken;
private String role;

public LoginResponse(String accessToken, String role) {
public LoginResponse(String refreshToken, String accessToken, String role) {
this.refreshToken = refreshToken;
this.accessToken = accessToken;
this.role = role;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.sanbosillok.sanbosillokserver.api.auth.dto;

import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class RefreshTokenRequest {
private String refreshToken;
}

0 comments on commit 2943974

Please sign in to comment.