Record Class OtpSettings
java.lang.Object
java.lang.Record
io.meeds.social.security.rest.model.OtpSettings
- Record Components:
sendIntervalSeconds- minimal delay between two sends, in secondsttlMinutes- validity of a sent code, in minutes
Timing of an OTP method, so that a client tells the user when a code can be
requested again and how long it stays valid
-
Constructor Summary
ConstructorsConstructorDescriptionOtpSettings(long sendIntervalSeconds, long ttlMinutes) Creates an instance of aOtpSettingsrecord 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.longReturns the value of thesendIntervalSecondsrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thettlMinutesrecord component.
-
Constructor Details
-
OtpSettings
public OtpSettings(long sendIntervalSeconds, long ttlMinutes) Creates an instance of aOtpSettingsrecord class.- Parameters:
sendIntervalSeconds- the value for thesendIntervalSecondsrecord componentttlMinutes- the value for thettlMinutesrecord 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 with '=='. -
sendIntervalSeconds
public long sendIntervalSeconds()Returns the value of thesendIntervalSecondsrecord component.- Returns:
- the value of the
sendIntervalSecondsrecord component
-
ttlMinutes
public long ttlMinutes()Returns the value of thettlMinutesrecord component.- Returns:
- the value of the
ttlMinutesrecord component
-