Package com.easydesk.modules.records
Record Class ChangePassword
java.lang.Object
java.lang.Record
com.easydesk.modules.records.ChangePassword
- Record Components:
username- (참고용 - 실제 대상 사용자는 세션의 로그인 사용자로 확정하고 이 값은 신뢰하지 않는다)oldPassword- 현재 비밀번호password- 새 비밀번호repassword- 새 비밀번호 확인
public record ChangePassword(String username, String oldPassword, String password, String repassword)
extends Record
비밀번호 변경 화면에서 쓰는 폼 바인딩용 레코드.
UserManager#changePassword(User, String oldPassword, String newPassword) 계약에
맞춰 oldPassword 필드를 추가했다 (기존에는 username/password/repassword만 있어서
"현재 비밀번호 확인" 없이 새 비밀번호만 바꾸는 forcePassword() 용도로밖에 못 썼다).
password() = 새 비밀번호, repassword() = 새 비밀번호 확인, oldPassword() = 현재 비밀번호.
TODO : validator 자동 설치, AttributeValue 의 Validator 에서 처리
-
Constructor Summary
ConstructorsConstructorDescriptionChangePassword(String username, String oldPassword, String password, String repassword) Creates an instance of aChangePasswordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theoldPasswordrecord component.password()Returns the value of thepasswordrecord component.Returns the value of therepasswordrecord component.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.
-
Constructor Details
-
ChangePassword
Creates an instance of aChangePasswordrecord class.- Parameters:
username- the value for theusernamerecord componentoldPassword- the value for theoldPasswordrecord componentpassword- the value for thepasswordrecord componentrepassword- the value for therepasswordrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
oldPassword
Returns the value of theoldPasswordrecord component.- Returns:
- the value of the
oldPasswordrecord component
-
password
Returns the value of thepasswordrecord component.- Returns:
- the value of the
passwordrecord component
-
repassword
Returns the value of therepasswordrecord component.- Returns:
- the value of the
repasswordrecord component
-