Class MechanismRegistrationHelper


  • public class MechanismRegistrationHelper
    extends java.lang.Object
    Convenience helper to simplify/standardize retrieval and processing of 2FA registrations.
    • Constructor Detail

      • MechanismRegistrationHelper

        public MechanismRegistrationHelper()
    • 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 - The CiServerConnection 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 - The CiServerConnection 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 - The CiServerConnection 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 - The CiServerConnection 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.