Package ch.rswk.meta.engine
Record Class UserService.OtpChallenge
java.lang.Object
java.lang.Record
ch.rswk.meta.engine.UserService.OtpChallenge
- Enclosing class:
UserService
private static record UserService.OtpChallenge(String hash, com.codahale.metrics.Timer.Context timer, @Nullable MetaUser.MetaUserOtp userOtp)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
The field for thehash
record component.private final com.codahale.metrics.Timer.Context
The field for thetimer
record component.private final @Nullable MetaUser.MetaUserOtp
The field for theuserOtp
record component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
OtpChallenge
(String hash, com.codahale.metrics.Timer.Context timer, @Nullable MetaUser.MetaUserOtp userOtp) Creates an instance of aOtpChallenge
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.static String
forgeCacheKey
(String ipAddress, UserService.OtpChallengeType type, String user) hash()
Returns the value of thehash
record component.final int
hashCode()
Returns a hash code value for this object.com.codahale.metrics.Timer.Context
timer()
Returns the value of thetimer
record component.final String
toString()
Returns a string representation of this record class.@Nullable MetaUser.MetaUserOtp
userOtp()
Returns the value of theuserOtp
record component.
-
Field Details
-
hash
The field for thehash
record component. -
timer
private final com.codahale.metrics.Timer.Context timerThe field for thetimer
record component. -
userOtp
The field for theuserOtp
record component.
-
-
Constructor Details
-
OtpChallenge
private OtpChallenge(String hash, com.codahale.metrics.Timer.Context timer, @Nullable MetaUser.MetaUserOtp userOtp) Creates an instance of aOtpChallenge
record class.- Parameters:
hash
- the value for thehash
record componenttimer
- the value for thetimer
record componentuserOtp
- the value for theuserOtp
record component
-
-
Method Details
-
forgeCacheKey
public static String forgeCacheKey(String ipAddress, UserService.OtpChallengeType type, String user) -
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)
. -
hash
Returns the value of thehash
record component.- Returns:
- the value of the
hash
record component
-
timer
public com.codahale.metrics.Timer.Context timer()Returns the value of thetimer
record component.- Returns:
- the value of the
timer
record component
-
userOtp
Returns the value of theuserOtp
record component.- Returns:
- the value of the
userOtp
record component
-