회원관리 수정중, 토큰 response 수정
This commit is contained in:
@@ -32,7 +32,7 @@ public class MemberDetails implements UserDetails {
|
||||
public String getUsername() {
|
||||
// 로그인 ID 로 무엇을 쓸지 선택
|
||||
// 1) 이메일 로그인:
|
||||
return member.getEmail();
|
||||
return member.getUserId();
|
||||
|
||||
// 2) 사번으로 로그인하고 싶으면:
|
||||
// return member.getEmployeeNo();
|
||||
|
||||
@@ -90,28 +90,34 @@ public class MembersDto {
|
||||
@Setter
|
||||
public static class AddReq {
|
||||
|
||||
@Schema(description = "사번", example = "11111")
|
||||
@Schema(description = "관리자 유형", example = "ROLE_ADMIN")
|
||||
@NotBlank
|
||||
@Size(max = 50)
|
||||
private String employeeNo;
|
||||
private String userRole;
|
||||
|
||||
@Schema(description = "이름", example = "홍길동")
|
||||
@NotBlank
|
||||
@Size(min = 2, max = 100)
|
||||
private String name;
|
||||
|
||||
@Schema(hidden = true)
|
||||
private String password;
|
||||
@Schema(description = "ID", example = "gildong")
|
||||
@NotBlank
|
||||
@Size(min = 2, max = 50)
|
||||
private String userId;
|
||||
|
||||
@Schema(description = "이메일", example = "gildong@daum.net")
|
||||
@Size(max = 100)
|
||||
private String email;
|
||||
@Schema(description = "임시 비밀번호", example = "q!w@e#r4")
|
||||
private String tempPassword;
|
||||
|
||||
public AddReq(String employeeNo, String name, String password, String email) {
|
||||
this.employeeNo = employeeNo;
|
||||
@Schema(description = "사번", example = "123456")
|
||||
private String employeeNo;
|
||||
|
||||
public AddReq(
|
||||
String userRole, String name, String userId, String tempPassword, String employeeNo) {
|
||||
this.userRole = userRole;
|
||||
this.name = name;
|
||||
this.password = password;
|
||||
this.email = email;
|
||||
this.userId = userId;
|
||||
this.tempPassword = tempPassword;
|
||||
this.employeeNo = employeeNo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,17 +135,12 @@ public class MembersDto {
|
||||
|
||||
@Schema(description = "패스워드", example = "")
|
||||
@Size(max = 255)
|
||||
private String password;
|
||||
private String tempPassword;
|
||||
|
||||
@Schema(description = "이메일", example = "gildong@daum.net")
|
||||
@Size(max = 100)
|
||||
private String email;
|
||||
|
||||
public UpdateReq(String employeeNo, String name, String password, String email) {
|
||||
public UpdateReq(String employeeNo, String name, String tempPassword) {
|
||||
this.employeeNo = employeeNo;
|
||||
this.name = name;
|
||||
this.password = password;
|
||||
this.email = email;
|
||||
this.tempPassword = tempPassword;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user