Record Class LoginAttemptService.LoginAttempt
java.lang.Object
java.lang.Record
eu.rarogsoftware.rarog.platform.core.security.LoginAttemptService.LoginAttempt
- Enclosing interface:
- LoginAttemptService
-
Constructor Summary
ConstructorsConstructorDescriptionLoginAttempt
(Instant attemptTime, boolean successful, String attemptIp, String userAgent) Creates an instance of aLoginAttempt
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattemptIp
record component.Returns the value of theattemptTime
record component.final boolean
Indicates whether some other object is "equal to" this one.(package private) static LoginAttemptService.LoginAttempt
failedAttempt
(Instant attemptTime, String attemptIp, String userAgent) final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of thesuccessful
record component.(package private) static LoginAttemptService.LoginAttempt
successfulAttempt
(Instant attemptTime, String attemptIp, String userAgent) final String
toString()
Returns a string representation of this record class.Returns the value of theuserAgent
record component.
-
Constructor Details
-
LoginAttempt
Creates an instance of aLoginAttempt
record class.- Parameters:
attemptTime
- the value for theattemptTime
record componentsuccessful
- the value for thesuccessful
record componentattemptIp
- the value for theattemptIp
record componentuserAgent
- the value for theuserAgent
record component
-
-
Method Details
-
successfulAttempt
static LoginAttemptService.LoginAttempt successfulAttempt(Instant attemptTime, String attemptIp, String userAgent) -
failedAttempt
static LoginAttemptService.LoginAttempt failedAttempt(Instant attemptTime, String attemptIp, String userAgent) -
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
attemptTime
Returns the value of theattemptTime
record component.- Returns:
- the value of the
attemptTime
record component
-
successful
public boolean successful()Returns the value of thesuccessful
record component.- Returns:
- the value of the
successful
record component
-
attemptIp
Returns the value of theattemptIp
record component.- Returns:
- the value of the
attemptIp
record component
-
userAgent
Returns the value of theuserAgent
record component.- Returns:
- the value of the
userAgent
record component
-