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 StringThe field for thehashrecord component.private final com.codahale.metrics.Timer.ContextThe field for thetimerrecord component.private final @Nullable MetaUser.MetaUserOtpThe field for theuserOtprecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateOtpChallenge(String hash, com.codahale.metrics.Timer.Context timer, @Nullable MetaUser.MetaUserOtp userOtp) Creates an instance of aOtpChallengerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static StringforgeCacheKey(String ipAddress, UserService.OtpChallengeType type, String user) hash()Returns the value of thehashrecord component.final inthashCode()Returns a hash code value for this object.com.codahale.metrics.Timer.Contexttimer()Returns the value of thetimerrecord component.final StringtoString()Returns a string representation of this record class.@Nullable MetaUser.MetaUserOtpuserOtp()Returns the value of theuserOtprecord component.
-
Field Details
-
hash
The field for thehashrecord component. -
timer
private final com.codahale.metrics.Timer.Context timerThe field for thetimerrecord component. -
userOtp
The field for theuserOtprecord component.
-
-
Constructor Details
-
OtpChallenge
private OtpChallenge(String hash, com.codahale.metrics.Timer.Context timer, @Nullable MetaUser.MetaUserOtp userOtp) Creates an instance of aOtpChallengerecord class.- Parameters:
hash- the value for thehashrecord componenttimer- the value for thetimerrecord componentuserOtp- the value for theuserOtprecord component
-
-
Method Details
-
forgeCacheKey
public static String forgeCacheKey(String ipAddress, UserService.OtpChallengeType type, String user) -
toString
-
hashCode
-
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 thehashrecord component.- Returns:
- the value of the
hashrecord component
-
timer
public com.codahale.metrics.Timer.Context timer()Returns the value of thetimerrecord component.- Returns:
- the value of the
timerrecord component
-
userOtp
Returns the value of theuserOtprecord component.- Returns:
- the value of the
userOtprecord component
-