Class RecentLoginHistory
- java.lang.Object
-
- com.unboundid.ldap.sdk.unboundidds.controls.RecentLoginHistory
-
- All Implemented Interfaces:
java.io.Serializable
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class RecentLoginHistory extends java.lang.Object implements java.io.Serializable
This class provides a data structure with information about recent successful and failed login attempts for a user.
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds
package structure, are only supported for use against Ping Identity, UnboundID, and Nokia/Alcatel-Lucent 8661 server products. These classes provide support for proprietary functionality or for external specifications that are not considered stable or mature enough to be guaranteed to work in an interoperable way with other types of LDAP servers.
-
-
Constructor Summary
Constructors Constructor Description RecentLoginHistory(JSONObject jsonObject)
Creates a new recent login history that is decoded from the provided JSON object.RecentLoginHistory(java.util.Collection<RecentLoginHistoryAttempt> successfulAttempts, java.util.Collection<RecentLoginHistoryAttempt> failedAttempts)
Creates a new recent login history with the provided sets of successful and failed attempts.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JSONObject
asJSONObject()
Retrieves a JSON object with an encoded representation of this recent login history.java.util.SortedSet<RecentLoginHistoryAttempt>
getFailedAttempts()
Retrieves the set of recent failed login attempts.java.util.SortedSet<RecentLoginHistoryAttempt>
getSuccessfulAttempts()
Retrieves the set of recent successful login attempts.java.lang.String
toString()
Retrieves a string representation of this recent login history.
-
-
-
Constructor Detail
-
RecentLoginHistory
public RecentLoginHistory(@Nullable java.util.Collection<RecentLoginHistoryAttempt> successfulAttempts, @Nullable java.util.Collection<RecentLoginHistoryAttempt> failedAttempts)
Creates a new recent login history with the provided sets of successful and failed attempts.- Parameters:
successfulAttempts
- A list of recent successful authentication attempts. It may benull
or empty if there were no recent successful attempts.failedAttempts
- A list of recent failed authentication attempts. It may benull
or empty if there were no recent failed attempts.
-
RecentLoginHistory
public RecentLoginHistory(@NotNull JSONObject jsonObject) throws LDAPException
Creates a new recent login history that is decoded from the provided JSON object.- Parameters:
jsonObject
- A JSON object containing an encoded representation of the recent login history. It must not benull
.- Throws:
LDAPException
- If a problem occurs while attempting to decode the provided JSON object as a recent login history.
-
-
Method Detail
-
getSuccessfulAttempts
@NotNull public java.util.SortedSet<RecentLoginHistoryAttempt> getSuccessfulAttempts()
Retrieves the set of recent successful login attempts.- Returns:
- The set of recent successful login attempts.
-
getFailedAttempts
@NotNull public java.util.SortedSet<RecentLoginHistoryAttempt> getFailedAttempts()
Retrieves the set of recent failed login attempts.- Returns:
- The set of recent failed login attempts.
-
asJSONObject
@NotNull public JSONObject asJSONObject()
Retrieves a JSON object with an encoded representation of this recent login history.- Returns:
- A JSON object with an encoded representation of this recent long history.
-
-