Record Class BruteForceLimitReached
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.audit.BruteForceLimitReached
- Record Components:
timestamp- UTC creation time, nevernullusername- username under lockout, nevernullclientAddress- remote client address, ornullfailedAttempts- number of recent failures that triggered the lockoutlockoutDuration- remaining lockout time, nevernull
- All Implemented Interfaces:
AuditEvent
public record BruteForceLimitReached(Instant timestamp, String username, String clientAddress, int failedAttempts, Duration lockoutDuration)
extends Record
implements AuditEvent
The login attempt policy locked a username/client because it crossed a
failure threshold. Subsequent attempts will be rejected until the
lockout elapses.
-
Constructor Summary
ConstructorsConstructorDescriptionBruteForceLimitReached(Instant timestamp, String username, String clientAddress, int failedAttempts, Duration lockoutDuration) Creates an instance of aBruteForceLimitReachedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclientAddressrecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefailedAttemptsrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thelockoutDurationrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.
-
Constructor Details
-
BruteForceLimitReached
public BruteForceLimitReached(Instant timestamp, String username, String clientAddress, int failedAttempts, Duration lockoutDuration) Creates an instance of aBruteForceLimitReachedrecord class.- Parameters:
timestamp- the value for thetimestamprecord componentusername- the value for theusernamerecord componentclientAddress- the value for theclientAddressrecord componentfailedAttempts- the value for thefailedAttemptsrecord componentlockoutDuration- the value for thelockoutDurationrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
timestamp
Returns the value of thetimestamprecord component.- Specified by:
timestampin interfaceAuditEvent- Returns:
- the value of the
timestamprecord component
-
username
-
clientAddress
Returns the value of theclientAddressrecord component.- Returns:
- the value of the
clientAddressrecord component
-
failedAttempts
public int failedAttempts()Returns the value of thefailedAttemptsrecord component.- Returns:
- the value of the
failedAttemptsrecord component
-
lockoutDuration
Returns the value of thelockoutDurationrecord component.- Returns:
- the value of the
lockoutDurationrecord component
-