update code security otp
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
package com.billpaymentservice.bbps.dto.auth;
|
||||
|
||||
import com.billpaymentservice.bbps.dto.auth.UserDto;
|
||||
|
||||
public class AuthResponse {
|
||||
private boolean success;
|
||||
private String message;
|
||||
private boolean userExists;
|
||||
private UserDto user;
|
||||
|
||||
public AuthResponse() {}
|
||||
|
||||
public AuthResponse(boolean success, String message, boolean userExists, UserDto user) {
|
||||
this.success = success;
|
||||
this.message = message;
|
||||
this.userExists = userExists;
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public boolean isUserExists() {
|
||||
return userExists;
|
||||
}
|
||||
|
||||
public void setUserExists(boolean userExists) {
|
||||
this.userExists = userExists;
|
||||
}
|
||||
|
||||
public UserDto getUser() {
|
||||
return user;
|
||||
}
|
||||
|
||||
public void setUser(UserDto user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.billpaymentservice.bbps.dto.auth;
|
||||
|
||||
public class LoginRequest {
|
||||
private String mobile;
|
||||
|
||||
public LoginRequest() {}
|
||||
|
||||
public LoginRequest(String mobile) {
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
public String getMobile() {
|
||||
return mobile;
|
||||
}
|
||||
|
||||
public void setMobile(String mobile) {
|
||||
this.mobile = mobile;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.billpaymentservice.bbps.dto.auth;
|
||||
|
||||
public class OtpSendResponse {
|
||||
private boolean success;
|
||||
private String message;
|
||||
|
||||
public OtpSendResponse() {}
|
||||
|
||||
public OtpSendResponse(boolean success, String message) {
|
||||
this.success = success;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.billpaymentservice.bbps.dto.auth;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class RegisterRequest {
|
||||
private String mobile;
|
||||
private String name;
|
||||
private String email;
|
||||
private int age;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.billpaymentservice.bbps.dto.auth;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserDto {
|
||||
private Long id;
|
||||
private String mobile;
|
||||
private String name;
|
||||
private String email;
|
||||
private int age;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.billpaymentservice.bbps.dto.auth;
|
||||
|
||||
public class VerifyOtpRequest {
|
||||
private String mobile;
|
||||
private String otp;
|
||||
|
||||
public VerifyOtpRequest() {
|
||||
}
|
||||
|
||||
public VerifyOtpRequest(String mobile, String otp) {
|
||||
this.mobile = mobile;
|
||||
this.otp = otp;
|
||||
}
|
||||
|
||||
public String getMobile() {
|
||||
return mobile;
|
||||
}
|
||||
|
||||
public void setMobile(String mobile) {
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
public String getOtp() {
|
||||
return otp;
|
||||
}
|
||||
|
||||
public void setOtp(String otp) {
|
||||
this.otp = otp;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.billpaymentservice.bbps.dto.request;
|
||||
|
||||
public class TransactionHistory {
|
||||
|
||||
}
|
||||
+3
-3
@@ -9,7 +9,7 @@ import lombok.NoArgsConstructor;
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class AuthResponse {
|
||||
public class AuthResponses {
|
||||
|
||||
private String token;
|
||||
|
||||
@@ -24,7 +24,7 @@ public class AuthResponse {
|
||||
private String anotherData;
|
||||
|
||||
// Constructor
|
||||
public AuthResponse(String status, String message, int statusCode, String token) {
|
||||
public AuthResponses(String status, String message, int statusCode, String token) {
|
||||
|
||||
this.status = status;
|
||||
this.message = message;
|
||||
@@ -32,7 +32,7 @@ public class AuthResponse {
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public AuthResponse(String token, String status, String message, int statusCode, Object data) {
|
||||
public AuthResponses(String token, String status, String message, int statusCode, Object data) {
|
||||
this.token = token;
|
||||
this.status = status;
|
||||
this.message = message;
|
||||
Reference in New Issue
Block a user