-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0eb43cf
commit b31bf39
Showing
14 changed files
with
289 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/com/behl/cerberus/dto/ResetPasswordRequestDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.behl.cerberus.dto; | ||
|
||
import com.fasterxml.jackson.databind.PropertyNamingStrategies; | ||
import com.fasterxml.jackson.databind.annotation.JsonNaming; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode; | ||
import jakarta.validation.constraints.Email; | ||
import jakarta.validation.constraints.NotBlank; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@JsonNaming(value = PropertyNamingStrategies.UpperCamelCaseStrategy.class) | ||
@Schema(title = "ResetPasswordRequest", accessMode = Schema.AccessMode.WRITE_ONLY) | ||
public class ResetPasswordRequestDto { | ||
|
||
@NotBlank(message = "email-id must not be empty") | ||
@Email(message = "email-id must be of valid format") | ||
@Schema(requiredMode = RequiredMode.REQUIRED, description = "email-id of user", example = "behl@gmail.com") | ||
private String emailId; | ||
|
||
@NotBlank(message = "current-password must not be empty") | ||
@Schema(requiredMode = RequiredMode.REQUIRED, description = "current-password of the user") | ||
private String currentPassword; | ||
|
||
@NotBlank(message = "new-password must not be empty") | ||
@Schema(requiredMode = RequiredMode.REQUIRED, description = "new-password of the user") | ||
private String newPassword; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/main/java/com/behl/cerberus/exception/InvalidCredentialsException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.behl.cerberus.exception; | ||
|
||
import org.springframework.http.HttpStatus; | ||
import org.springframework.web.server.ResponseStatusException; | ||
|
||
import lombok.NonNull; | ||
|
||
public class InvalidCredentialsException extends ResponseStatusException { | ||
|
||
private static final long serialVersionUID = 7439642984069939024L; | ||
|
||
public InvalidCredentialsException(@NonNull final String message) { | ||
super(HttpStatus.UNAUTHORIZED, message); | ||
} | ||
|
||
} |
15 changes: 0 additions & 15 deletions
15
src/main/java/com/behl/cerberus/exception/InvalidLoginCredentialsException.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.