Package com.tivoli.am.fim.registrations
Class MechanismRegistrationHelper
- java.lang.Object
-
- com.tivoli.am.fim.registrations.MechanismRegistrationHelper
-
public class MechanismRegistrationHelper extends java.lang.Object
Convenience helper to simplify/standardize retrieval and processing of 2FA registrations.
-
-
Constructor Summary
Constructors Constructor Description MechanismRegistrationHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CloudMechanism[]
getCloudRegistrationsForUser(java.lang.String username, CiServerConnection conn)
Fetches an array of IBM Security Verify Registrations for the supplied user in the CI instance supplied.static CloudMechanism[]
getCloudRegistrationsForUser(java.lang.String username, java.lang.String locale, CiServerConnection conn)
Fetches an array of IBM Security Verify Registrations for the supplied user in the CI instance supplied.static EULAStatus[]
getEulaStatusForUser(java.lang.String username)
Fetches an array of EULAStatus for the supplied user.static FIDORegistration[]
getFidoRegistrationsForUser(java.lang.String username)
Fetches an array of FIDO Registrations for the supplied user.static FIDORegistration[]
getFidoRegistrationsForUser(java.lang.String username, java.lang.String locale)
Fetches an array of FIDO Registrations for the supplied user.static MMFARegistration[]
getMmfaRegistrationsForUser(java.lang.String username)
Fetches an array of MMFA Registrations for the supplied userstatic MMFATransactionData
getMMFATransaction(java.lang.String txnId)
Return the MMFA transaction data for a given transaction id.static MMFATransactionData[]
getMMFATransactions(java.lang.String user)
List all of the MMFA transactions for a user.static MechanismList
getRegistrationsForUser(java.lang.String username)
Fetches the list of registrations associated with the supplied user.static MechanismList
getRegistrationsForUser(java.lang.String username, CiServerConnection conn)
Fetches the list of registrations for the supplied user.static MechanismList
getRegistrationsForUser(java.lang.String username, java.lang.String locale)
Fetches the list of registrations for the supplied user.static MechanismList
getRegistrationsForUser(java.lang.String username, java.lang.String locale, CiServerConnection conn)
Fetches the list of registrations for the supplied user.static boolean
isHotpEnrolled(java.lang.String username)
Fetches the HOTP enrollment status of the user Uses the default Locale.static boolean
isHotpEnrolled(java.lang.String username, java.lang.String locale)
Fetches the HOTP enrollment status of the user Uses the supplied Locale.static boolean
isKQEnrolled(java.lang.String username)
Fetches the Knowledge Question enrollment status of the user Uses the default Locale.static boolean
isKQEnrolled(java.lang.String username, java.lang.String locale)
Fetches the Knowledge Question enrollment status of the user Uses the supplied Locale.static boolean
isTotpEnrolled(java.lang.String username)
Fetches the TOTP enrollment status of the user Uses the default Locale.static boolean
isTotpEnrolled(java.lang.String username, java.lang.String locale)
Fetches the TOTP enrollment status of the user Uses the supplied Locale.
-
-
-
Method Detail
-
getRegistrationsForUser
public static MechanismList getRegistrationsForUser(java.lang.String username)
Fetches the list of registrations associated with the supplied user. Uses the default Locale.- Parameters:
username
- The username of the user to fetch registrations for.- Returns:
- A list of Mechanisms associated with the user as a
MechanismList
.
-
getRegistrationsForUser
public static MechanismList getRegistrationsForUser(java.lang.String username, java.lang.String locale)
Fetches the list of registrations for the supplied user. Uses the supplied Locale.- Parameters:
username
- The username of the user to fetch registrations for.locale
- The locale to use in case of error messages.- Returns:
- A list of Mechanisms associated with the user as a
MechanismList
.
-
getRegistrationsForUser
public static MechanismList getRegistrationsForUser(java.lang.String username, CiServerConnection conn)
Fetches the list of registrations for the supplied user. Includes any IBM Security Verify mechanisms using the supplied CiServerConnection. Uses the default Locale.- Parameters:
username
- The username of the user to fetch registrations for.conn
- TheCiServerConnection
to use for all network calls to IBM Security Verify.- Returns:
- A list of Mechanisms associated with the user as a
MechanismList
.
-
getRegistrationsForUser
public static MechanismList getRegistrationsForUser(java.lang.String username, java.lang.String locale, CiServerConnection conn)
Fetches the list of registrations for the supplied user. Includes any IBM Security Verify mechanisms using the supplied CiServerConnection. Uses the supplied Locale.- Parameters:
username
- The username of the user to fetch registrations for.locale
- The locale to use in case of error messages.conn
- TheCiServerConnection
to use for all network calls to IBM Security Verify.- Returns:
- A list of Mechanisms associated with the user as a
MechanismList
.
-
getCloudRegistrationsForUser
public static CloudMechanism[] getCloudRegistrationsForUser(java.lang.String username, CiServerConnection conn)
Fetches an array of IBM Security Verify Registrations for the supplied user in the CI instance supplied. Uses the default Locale.- Parameters:
username
- The username of the user to fetch registrations for.conn
- TheCiServerConnection
to use for all network calls to IBM Security Verify.- Returns:
- An array of
CloudMechanism
for the user. An empty array indicates that no IBM Security Verify registrations exist for the user.
-
getCloudRegistrationsForUser
public static CloudMechanism[] getCloudRegistrationsForUser(java.lang.String username, java.lang.String locale, CiServerConnection conn)
Fetches an array of IBM Security Verify Registrations for the supplied user in the CI instance supplied. Uses the supplied Locale.- Parameters:
username
- The username of the user to fetch registrations for.locale
- The locale to use in case of error messages.conn
- TheCiServerConnection
to use for all network calls to IBM Security Verify.- Returns:
- An array of
CloudMechanism
for the user. An empty array indicates that no IBM Security Verify registrations exist for the user.
-
getFidoRegistrationsForUser
public static FIDORegistration[] getFidoRegistrationsForUser(java.lang.String username)
Fetches an array of FIDO Registrations for the supplied user. Uses the default Locale.- Parameters:
username
- The username of the user to fetch registrations for.- Returns:
- An array of
FIDORegistration
for the user. An empty array indicates that no FIDO registrations exist for the user.
-
getFidoRegistrationsForUser
public static FIDORegistration[] getFidoRegistrationsForUser(java.lang.String username, java.lang.String locale)
Fetches an array of FIDO Registrations for the supplied user. Uses the supplied Locale.- Parameters:
username
- The username of the user to fetch registrations for.locale
- The locale to use in case of error messages.- Returns:
- An array of
FIDORegistration
for the user. An empty array indicates that no FIDO registrations exist for the user.
-
getMmfaRegistrationsForUser
public static MMFARegistration[] getMmfaRegistrationsForUser(java.lang.String username)
Fetches an array of MMFA Registrations for the supplied user- Parameters:
username
- The username of the user to fetch registrations for.- Returns:
- An array of
MMFARegistration
for the user. An empty array indicates that no MMFA registrations exist for the user.
-
getEulaStatusForUser
public static EULAStatus[] getEulaStatusForUser(java.lang.String username)
Fetches an array of EULAStatus for the supplied user.- Parameters:
username
- The username of the user to fetch status of EULA for.- Returns:
- An array of
EULAStatus
for the user. An empty array indicates that no EULA's have been accepted by the user.
-
isHotpEnrolled
public static boolean isHotpEnrolled(java.lang.String username)
Fetches the HOTP enrollment status of the user Uses the default Locale.- Parameters:
username
- The username of the user to perform this check for.- Returns:
- A boolean indicating if the user has HOTP enrolled.
-
isHotpEnrolled
public static boolean isHotpEnrolled(java.lang.String username, java.lang.String locale)
Fetches the HOTP enrollment status of the user Uses the supplied Locale.- Parameters:
username
- The username of the user to perform this check for.locale
- The locale to use in case of error messages.- Returns:
- A boolean indicating if the user has HOTP enrolled.
-
isTotpEnrolled
public static boolean isTotpEnrolled(java.lang.String username)
Fetches the TOTP enrollment status of the user Uses the default Locale.- Parameters:
username
- The username of the user to perform this check for.- Returns:
- A boolean indicating if the user has TOTP enrolled.
-
isTotpEnrolled
public static boolean isTotpEnrolled(java.lang.String username, java.lang.String locale)
Fetches the TOTP enrollment status of the user Uses the supplied Locale.- Parameters:
username
- The username of the user to perform this check for.locale
- The locale to use in case of error messages.- Returns:
- A boolean indicating if the user has TOTP enrolled.
-
isKQEnrolled
public static boolean isKQEnrolled(java.lang.String username)
Fetches the Knowledge Question enrollment status of the user Uses the default Locale.- Parameters:
username
- The username of the user to perform this check for.- Returns:
- A boolean indicating if the user has any Knowledge Questions enrolled.
-
isKQEnrolled
public static boolean isKQEnrolled(java.lang.String username, java.lang.String locale)
Fetches the Knowledge Question enrollment status of the user Uses the supplied Locale.- Parameters:
username
- The username of the user to perform this check for.locale
- The locale to use in case of error messages.- Returns:
- A boolean indicating if the user has Knowledge Questions enrolled.
-
getMMFATransactions
public static MMFATransactionData[] getMMFATransactions(java.lang.String user)
List all of the MMFA transactions for a user.- Parameters:
user
- The username that transactions should be fetched for- Returns:
- A list of 0 or more MMFA transactions.
-
getMMFATransaction
public static MMFATransactionData getMMFATransaction(java.lang.String txnId)
Return the MMFA transaction data for a given transaction id.- Parameters:
txnId
- The unique identifier of the MMFA transaction.- Returns:
- The transaction data or null if the transaction could not be found.
-
-