-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AYS-328 | Create Password Flow Has Been Created (#358)
- Loading branch information
1 parent
c6dac35
commit b36f181
Showing
11 changed files
with
608 additions
and
52 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
33 changes: 33 additions & 0 deletions
33
src/main/java/org/ays/auth/model/request/AysPasswordCreateRequest.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,33 @@ | ||
package org.ays.auth.model.request; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import jakarta.validation.constraints.AssertTrue; | ||
import jakarta.validation.constraints.NotBlank; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.apache.commons.lang3.StringUtils; | ||
|
||
@Getter | ||
@Setter | ||
public class AysPasswordCreateRequest { | ||
|
||
@NotBlank | ||
private String password; | ||
|
||
@NotBlank | ||
private String passwordRepeat; | ||
|
||
|
||
@JsonIgnore | ||
@AssertTrue(message = "passwords must be equal") | ||
@SuppressWarnings("This method is unused by the application directly but Spring is using it in the background.") | ||
private boolean isPasswordsEqual() { | ||
|
||
if (StringUtils.isEmpty(this.password) || StringUtils.isEmpty(this.passwordRepeat)) { | ||
return true; | ||
} | ||
|
||
return this.password.equals(this.passwordRepeat); | ||
} | ||
|
||
} |
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
Oops, something went wrong.