Skip to content

Commit

Permalink
feat: 로그인 request, response DTO 추가
Browse files Browse the repository at this point in the history
related to: #11
  • Loading branch information
heejjinkim committed Sep 3, 2024
1 parent 0b92373 commit 1883a81
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/main/java/com/_119/wepro/auth/dto/request/AuthRequest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com._119.wepro.auth.dto.request;

import com._119.wepro.global.enums.Provider;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

public class AuthRequest {

@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class SignInRequest {

@NotNull
@Enumerated(EnumType.STRING)
private Provider provider;

@NotNull
private String idToken;
}

@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class SignUpRequest {

@NotNull
private String position;
}
}
18 changes: 18 additions & 0 deletions src/main/java/com/_119/wepro/auth/dto/response/AuthResponse.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com._119.wepro.auth.dto.response;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

public class AuthResponse {

@Getter
@AllArgsConstructor
@NoArgsConstructor
public static class SignInResponse {

private boolean newMember;
private TokenInfo tokenInfo;
}

}
12 changes: 12 additions & 0 deletions src/main/java/com/_119/wepro/auth/dto/response/TokenInfo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com._119.wepro.auth.dto.response;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public class TokenInfo {
private String type;
private String accessToken;
private String refreshToken;
}

0 comments on commit 1883a81

Please sign in to comment.