add security
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class UserDetailsDTO {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String userEmailId;
|
||||
|
||||
private String userMobNo;
|
||||
|
||||
private String userName;
|
||||
|
||||
private String userAge;
|
||||
}
|
||||
@@ -11,7 +11,5 @@ public class ComplaintRequestDTO extends BaseClass {
|
||||
private String ticketDisposition; // Complaint disposition
|
||||
private String ticketDispositionCode; // Type of complaint
|
||||
private String txnId; // Transaction ID (optional)
|
||||
private String billerId; // Client Req ID (optional);
|
||||
private String billerName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.billpaymentservice.bbps.dto.request;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Data
|
||||
@Getter
|
||||
@Setter
|
||||
public class LoginRequest {
|
||||
|
||||
@NotBlank(message = "Mobile number is required")
|
||||
@Pattern(regexp = "^[6-9]\\d{9}$", message = "Invalid mobile number. It must be 10 digits and start with 6, 7, 8, or 9.")
|
||||
private String mobileNumber;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.billpaymentservice.bbps.dto.response;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class AuthResponse {
|
||||
|
||||
private String token;
|
||||
|
||||
private String status;
|
||||
|
||||
private String message;
|
||||
|
||||
private int statusCode;
|
||||
|
||||
private Object data;
|
||||
|
||||
private String anotherData;
|
||||
|
||||
// Constructor
|
||||
public AuthResponse(String status, String message, int statusCode, String token) {
|
||||
|
||||
this.status = status;
|
||||
this.message = message;
|
||||
this.statusCode = statusCode;
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public AuthResponse(String token, String status, String message, int statusCode, Object data) {
|
||||
this.token = token;
|
||||
this.status = status;
|
||||
this.message = message;
|
||||
this.statusCode = statusCode;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user