Authentication and Verification Data Contracts
Overview
These DTOs define the payload boundaries for the authentication and verification flows in com.bankasap.dto. They keep the contract surface narrow: login uses credentials, sign-up adds password confirmation, verification uses an email plus code pair, and resend operations use email-only requests.
AuthResponse is the only response model in this group. It carries a single message value, while the request models expose getters over private fields and use no-argument constructors where the source defines them for request binding.
Contract Summary
| DTO | Flow | Fields | Public accessors |
|---|---|---|---|
AuthResponse |
Authentication and verification responses | message |
getMessage |
LoginRequest |
Login | email, password |
getEmail, getPassword |
SignUpRequest |
Sign-up | email, password, confirmPassword |
getEmail, getPassword, getConfirmPassword |
VerifyCodeRequest |
Code verification | email, code |
getEmail, getCode |
VerifySignUpRequest |
Sign-up verification | email, code |
getEmail, getCode |
ResendCodeRequest |
Resend code | email |
getEmail |
ResendSignUpCodeRequest |
Resend sign-up code | email |
getEmail |
Contract Grouping
flowchart LR
subgraph loginFlow[Login]
loginRequest[LoginRequest]
authResponse[AuthResponse]
end
subgraph signUpFlow[Sign Up]
signUpRequest[SignUpRequest]
end
subgraph verificationFlow[Verification]
verifyCodeRequest[VerifyCodeRequest]
verifySignUpRequest[VerifySignUpRequest]
end
subgraph resendFlow[Resend]
resendCodeRequest[ResendCodeRequest]
resendSignUpCodeRequest[ResendSignUpCodeRequest]
end
This grouping shows how the contracts divide the authentication surface into separate request shapes. The verification and resend pairs deliberately remain distinct classes even where their field lists are identical, which keeps the sign-up-specific flows separate from the general code-handling flows.
DTO Details
Auth Response
src/main/java/com/bankasap/dto/AuthResponse.java
AuthResponse is the response contract in this group. The source defines a constructor that accepts message, and the class exposes getMessage for reading the stored value.
Properties
| Property | Type | Description |
|---|---|---|
message |
String |
Response message returned after authentication or verification processing. |
Public Methods
| Method | Description |
|---|---|
getMessage |
Returns the stored response message. |
Login Request
src/main/java/com/bankasap/dto/LoginRequest.java
LoginRequest carries the credentials required for login. The class defines a no-argument constructor and exposes getters for the submitted email address and password.
Properties
| Property | Type | Description |
|---|---|---|
email |
String |
Email address supplied for login. |
password |
String |
Password supplied for login. |
Public Methods
| Method | Description |
|---|---|
getEmail |
Returns the submitted email address. |
getPassword |
[REDACTED] |
Sign Up Request
src/main/java/com/bankasap/dto/SignUpRequest.java
SignUpRequest carries the data needed to create a new account submission. It extends the login-style credential pair with confirmPassword, which keeps the sign-up contract separate from the login contract.
Properties
| Property | Type | Description |
|---|---|---|
email |
String |
Email address supplied for account creation. |
password |
String |
Password chosen for the new account. |
confirmPassword |
String |
Confirmation value supplied alongside password during sign-up. |
Public Methods
| Method | Description |
|---|---|
getEmail |
Returns the submitted email address. |
getPassword |
[REDACTED] |
getConfirmPassword |
[REDACTED] |
Verify Code Request
src/main/java/com/bankasap/dto/VerifyCodeRequest.java
VerifyCodeRequest represents the generic code verification payload. The class has a no-argument constructor and exposes getters for email and code.
Properties
| Property | Type | Description |
|---|---|---|
email |
String |
Email address associated with the verification attempt. |
code |
String |
One-time verification code supplied with the email address. |
Public Methods
| Method | Description |
|---|---|
getEmail |
Returns the email address tied to the verification request. |
getCode |
Returns the verification code. |
Verify Sign Up Request
src/main/java/com/bankasap/dto/VerifySignUpRequest.java
VerifySignUpRequest uses the same field shape as VerifyCodeRequest, but it keeps the sign-up verification path explicit at the contract level. The class exposes the same email and code getters through a separate type.
Properties
| Property | Type | Description |
|---|---|---|
email |
String |
Email address tied to the sign-up verification attempt. |
code |
String |
Verification code used to complete sign-up. |
Public Methods
| Method | Description |
|---|---|
getEmail |
Returns the email address tied to the sign-up verification request. |
getCode |
Returns the sign-up verification code. |
Resend Code Request
src/main/java/com/bankasap/dto/ResendCodeRequest.java
ResendCodeRequest is the email-only payload for resending a code. The contract stays minimal by carrying just the address needed to identify the target account.
Properties
| Property | Type | Description |
|---|---|---|
email |
String |
Email address used to locate the code recipient. |
Public Methods
| Method | Description |
|---|---|
getEmail |
Returns the email address used for the resend request. |
Resend Sign Up Code Request
src/main/java/com/bankasap/dto/ResendSignUpCodeRequest.java
ResendSignUpCodeRequest mirrors ResendCodeRequest but remains a separate type for the sign-up resend path. The source keeps the shape minimal and explicit with one email field and one accessor.
Properties
| Property | Type | Description |
|---|---|---|
email |
String |
Email address used to resend the sign-up code. |
Public Methods
| Method | Description |
|---|---|
getEmail |
Returns the email address used for the sign-up resend request. |