Class CiClientV2


  • public class CiClientV2
    extends CiClientBase
    Convenience wrapper for the version 2 HTTP client to simplify/standardize CI requests. This is similar to the CiClient class but uses the new HttpClientV2 for all HTTP requests to CI.
    • Constructor Detail

      • CiClientV2

        public CiClientV2()
    • Method Detail

      • getAccessToken

        public static AccessToken getAccessToken​(CiServerConnection connection)
        Fetches the IBM Security Verify access token for the configured CI Server Connection. This method first attempts to get the token from a LRU cache, and if the token is not in the cache, or has expired, a new token it retrieved.
        Parameters:
        connection - The CI Server Connection which contains details required for the access token flow, client ID and client secret.
        Returns:
        The AccessToken object.
      • getUser

        public static java.lang.String getUser​(CiServerConnection connection,
                                               java.lang.String username)
        Fetches the IBM Security Verify user object as a JSON String. The user object will be in SCIM format.
        Parameters:
        connection - The CI Server Connection.
        username - The username of the CI user.
        Returns:
        A JSON String representation of the user.
      • getUser

        public static java.lang.String getUser​(CiServerConnection connection,
                                               java.lang.String username,
                                               java.lang.String locale)
        Fetches the IBM Security Verify user object as a JSON String. The user object will be in SCIM format.
        Parameters:
        connection - The CI Server Connection.
        username - The username of the CI user.
        locale - The locale to use in the Accept-Language header.
        Returns:
        A JSON String representation of the user.
      • basicAuthentication

        public static boolean basicAuthentication​(CiServerConnection connection,
                                                  java.lang.String username,
                                                  java.lang.String password)
      • basicAuthentication

        public static boolean basicAuthentication​(CiServerConnection connection,
                                                  java.lang.String username,
                                                  java.lang.String password,
                                                  java.lang.String locale)
        Performs username/password authentication against IBM Security Verify.
        Parameters:
        connection - The CI Server Connection.
        username - The username of the CI user.
        password - The password of the CI user.
        locale - The locale to use in the Accept-Language header.
        Returns:
        A boolean indicating if the authentication succeeded or failed.
      • registerAuthenticator

        public static HttpResponse registerAuthenticator​(CiServerConnection connection,
                                                         java.lang.String json,
                                                         boolean respAsJson)
        Registers an authenticator with IBM Security Verify. If respAsJson is true, then the qrcodeInResponse query string param will be set to true. This means the response from CI will be JSON with the base64 encoded QR code, rather than the default response which is the QR code as an image.
        Parameters:
        connection - The CI Server Connection.
        json - The authentication registration payload.
        respAsJson - A boolean indicating if the response should be JSON or an image.
        Returns:
        The HTTP response. Can be null if the request failed.
      • registerAuthenticator

        public static HttpResponse registerAuthenticator​(CiServerConnection connection,
                                                         java.lang.String json,
                                                         boolean respAsJson,
                                                         java.lang.String locale)
        Registers an authenticator with IBM Security Verify. If respAsJson is true, then the qrcodeInResponse query string param will be set to true. This means the response from CI will be JSON with the base64 encoded QR code, rather than the default response which is the QR code as an image.
        Parameters:
        connection - The CI Server Connection.
        json - The authentication registration payload.
        respAsJson - A boolean indicating if the response should be JSON or an image.
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • getAuthenticators

        public static HttpResponse getAuthenticators​(CiServerConnection connection,
                                                     java.lang.String userId)
        Fetch all authenticators registered with userId set as the owner.
        Parameters:
        connection - The CI Server Connection.
        userId - The user's SCIM ID.
        Returns:
        The HTTP response. Can be null if the request failed.
      • getAuthenticators

        public static HttpResponse getAuthenticators​(CiServerConnection connection,
                                                     java.lang.String userId,
                                                     java.lang.String locale)
        Fetch all authenticators that are owned by the provided SCIM user ID.
        Parameters:
        connection - The CI Server Connection.
        userId - The user's SCIM ID.
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • getAuthenticators

        public static HttpResponse getAuthenticators​(CiServerConnection connection,
                                                     java.lang.String userId,
                                                     java.lang.String locale,
                                                     java.lang.String search)
        Fetch all authenticators that are owned by the provided SCIM user ID.
        Parameters:
        connection - The CI Server Connection.
        userId - The user's SCIM ID.
        locale - The locale to use in the Accept-Language header.
        search - The search parameters to apply to the request. Must be of the form attribute=value. For example: "enabled=true"
        Returns:
        The HTTP response. Can be null if the request failed.
      • getFactors

        public static HttpResponse getFactors​(CiServerConnection connection,
                                              java.lang.String search,
                                              java.lang.String locale)
        Fetch a list of authentication factors based on an optional search string. If the search string is null, all factors across all users will be returned.
        Parameters:
        connection - The CI Server Connection.
        search - The search parameters to apply to the request. Must be of the form attribute=value. For example: 'userId="61200033O2"&validated=true'
        locale - The locale to use in the Accept-Language header, or null if not required.
        Returns:
        The HTTP response. Can be null if the request failed.
      • getFactor

        public static HttpResponse getFactor​(CiServerConnection connection,
                                             java.lang.String type,
                                             java.lang.String id,
                                             java.lang.String locale)
        Fetch a specific authentication factor with the given type and ID.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication factor. For example "totp", "emailotp", "smsotp", "fido2", etc.
        id - The ID of the authentication factor
        locale - The locale to use in the Accept-Language header, or null if not required.
        Returns:
        The HTTP response. Can be null if the request failed.
      • enrollFactor

        public static HttpResponse enrollFactor​(CiServerConnection connection,
                                                java.lang.String type,
                                                java.lang.String json,
                                                java.lang.String queryParams,
                                                java.lang.String locale)
        Enroll an authentication factor with provided type and JSON payload.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication factor. For example "totp", "emailotp", "smsotp", "fido2", etc.
        json - The JSON payload of the enrollment.
        queryParams - The query parameters to apply to the request. Must be of the form key=value. For example: 'qrCodeInResponse=true'
        locale - The locale to use in the Accept-Language header, or null if not required.
        Returns:
        The HTTP response. Can be null if the request failed.
      • getFactorVerifications

        public static HttpResponse getFactorVerifications​(CiServerConnection connection,
                                                          java.lang.String type,
                                                          java.lang.String id,
                                                          java.lang.String locale)
        Fetch a list of verifications for the provided authentication factor.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication factor. For example "emailotp", "smsotp", etc.
        id - The ID of the authentication factor
        locale - The locale to use in the Accept-Language header, or null if not required.
        Returns:
        The HTTP response. Can be null if the request failed.
      • getFactorVerification

        public static HttpResponse getFactorVerification​(CiServerConnection connection,
                                                         java.lang.String type,
                                                         java.lang.String id,
                                                         java.lang.String verificationId,
                                                         java.lang.String locale)
        Fetch a specific verification.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication factor. For example "emailotp", "smsotp", etc.
        id - The ID of the authentication factor
        verificationId - The ID of the verification
        locale - The locale to use in the Accept-Language header, or null if not required.
        Returns:
        The HTTP response. Can be null if the request failed.
      • createFactorVerification

        public static HttpResponse createFactorVerification​(CiServerConnection connection,
                                                            java.lang.String type,
                                                            java.lang.String id,
                                                            java.lang.String json,
                                                            java.lang.String locale)
        Create a verification for the specified enrollment.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication factor. For example "emailotp", "smsotp", etc.
        id - The ID of the authentication factor
        json - The JSON payload of the enrollment.
        locale - The locale to use in the Accept-Language header, or null if not required.
        Returns:
        The HTTP response. Can be null if the request failed.
      • updateFactor

        public static HttpResponse updateFactor​(CiServerConnection connection,
                                                java.lang.String type,
                                                java.lang.String id,
                                                java.lang.String json,
                                                java.lang.String locale)
        Update a specific authentication factor with the provided ID, type, and JSON payload.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication factor. For example "totp", "emailotp", "smsotp", "fido2", etc.
        id - The ID of the authentication factor
        json - The JSON payload of the enrollment.
        locale - The locale to use in the Accept-Language header, or null if not required.
        Returns:
        The HTTP response. Can be null if the request failed.
      • deleteFactor

        public static HttpResponse deleteFactor​(CiServerConnection connection,
                                                java.lang.String type,
                                                java.lang.String id,
                                                java.lang.String locale)
        Delete a specific authentication factor with the provided ID and type.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication factor. For example "totp", "emailotp", "smsotp", "fido2", etc.
        id - The ID of the authentication factor
        locale - The locale to use in the Accept-Language header, or null if not required.
        Returns:
        The HTTP response. Can be null if the request failed.
      • verifyTOTPFactor

        public static HttpResponse verifyTOTPFactor​(CiServerConnection connection,
                                                    java.lang.String id,
                                                    java.lang.String json,
                                                    java.lang.String locale)
        Complete a TOTP verification with the provided OTP payload.
        Parameters:
        connection - The CI Server Connection.
        id - The ID of the authentication factor
        json - The JSON payload of the verification.
        locale - The locale to use in the Accept-Language header, or null if not required.
        Returns:
        The HTTP response. Can be null if the request failed.
      • verifyFactor

        public static HttpResponse verifyFactor​(CiServerConnection connection,
                                                java.lang.String type,
                                                java.lang.String id,
                                                java.lang.String verificationId,
                                                java.lang.String json,
                                                java.lang.String locale)
        Complete a verification with the provided payload for a specific authentication factor.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication factor. For example "emailotp", "smsotp", etc.
        id - The ID of the authentication factor
        verificationId - The ID of the verification
        json - The JSON payload of the verification.
        locale - The locale to use in the Accept-Language header, or null if not required.
        Returns:
        The HTTP response. Can be null if the request failed.
      • getFactors

        public static HttpResponse getFactors​(CiServerConnection connection,
                                              java.lang.String userId,
                                              java.lang.String locale,
                                              java.lang.String search)
        Deprecated.
        It is not recommended to use this method as it has the userId attribute hardcoded. Use getFactors(CiServerConnection, String, String) instead.
        Fetch the authentication factors that are owned by the provided SCIM user ID.
        Parameters:
        connection - The CI Server Connection.
        userId - The user's SCIM ID.
        locale - The locale to use in the Accept-Language header, or null if not required.
        search - The search parameters to apply to the request. Must be of the form attribute=value. For example: "validated=true"
        Returns:
        The HTTP response. Can be null if the request failed.
      • getAuthenticator

        public static HttpResponse getAuthenticator​(CiServerConnection connection,
                                                    java.lang.String id)
        Fetches a specific authenticator with the provided ID.
        Parameters:
        connection - The CI Server Connection.
        id - The ID of the authenticator
        Returns:
        The HTTP response. Can be null if the request failed.
      • getAuthenticator

        public static HttpResponse getAuthenticator​(CiServerConnection connection,
                                                    java.lang.String id,
                                                    java.lang.String locale)
        Fetches a specific authenticator with the provided ID.
        Parameters:
        connection - The CI Server Connection.
        id - The ID of the authenticator
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • updateAuthenticator

        public static HttpResponse updateAuthenticator​(CiServerConnection connection,
                                                       java.lang.String id,
                                                       java.lang.String json)
        Update an authenticator with the provided JSON payload.
        Parameters:
        connection - The CI Server Connection.
        id - The ID of the authenticator
        json - The updated JSON payload of the authenticator.
        Returns:
        The HTTP response. Can be null if the request failed.
      • updateAuthenticator

        public static HttpResponse updateAuthenticator​(CiServerConnection connection,
                                                       java.lang.String id,
                                                       java.lang.String json,
                                                       java.lang.String locale)
        Update an authenticator with the provided JSON payload.
        Parameters:
        connection - The CI Server Connection.
        id - The ID of the authenticator
        json - The updated JSON payload of the authenticator.
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • deleteAuthenticator

        public static HttpResponse deleteAuthenticator​(CiServerConnection connection,
                                                       java.lang.String id)
        Delete the authenticator with the provided ID.
        Parameters:
        connection - The CI Server Connection.
        id - The ID of the authenticator
        Returns:
        The HTTP response. Can be null if the request failed.
      • deleteAuthenticator

        public static HttpResponse deleteAuthenticator​(CiServerConnection connection,
                                                       java.lang.String id,
                                                       java.lang.String locale)
        Delete the authenticator with the provided ID.
        Parameters:
        connection - The CI Server Connection.
        id - The ID of the authenticator
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • getAuthMethods

        public static HttpResponse getAuthMethods​(CiServerConnection connection,
                                                  java.lang.String userId)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use getFactors(CiServerConnection, String, String)
        Fetch the authentication methods that are owned by the provided SCIM user ID.
        Parameters:
        connection - The CI Server Connection.
        userId - The user's SCIM ID.
        Returns:
        The HTTP response. Can be null if the request failed.
      • getAuthMethods

        public static HttpResponse getAuthMethods​(CiServerConnection connection,
                                                  java.lang.String userId,
                                                  java.lang.String locale)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use getFactors(CiServerConnection, String, String)
        Fetch the authentication methods that are owned by the provided SCIM user ID.
        Parameters:
        connection - The CI Server Connection.
        userId - The user's SCIM ID.
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • getAuthMethods

        public static HttpResponse getAuthMethods​(CiServerConnection connection,
                                                  java.lang.String userId,
                                                  java.lang.String locale,
                                                  java.lang.String search)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use getFactors(CiServerConnection, String, String)
        Fetch the authentication methods that are owned by the provided SCIM user ID.
        Parameters:
        connection - The CI Server Connection.
        userId - The user's SCIM ID.
        locale - The locale to use in the Accept-Language header.
        search - The search parameters to apply to the request. Must be of the form attribute=value. For example: "isValidated=true"
        Returns:
        The HTTP response. Can be null if the request failed.
      • getSignatureAuthMethods

        public static HttpResponse getSignatureAuthMethods​(CiServerConnection connection,
                                                           java.lang.String userId,
                                                           boolean embeddedAttrs)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use getFactors(CiServerConnection, String, String)
        Fetch the authentication methods that are owned by the provided SCIM user ID for a specific type.
        Parameters:
        connection - The CI Server Connection.
        userId - The user's SCIM ID.
        embeddedAttrs - A flag indicating if the embedded attributes of the auth method should be included (i.e. authenticator attributes).
        Returns:
        The HTTP response. Can be null if the request failed.
      • getSignatureAuthMethods

        public static HttpResponse getSignatureAuthMethods​(CiServerConnection connection,
                                                           java.lang.String userId,
                                                           java.lang.String locale,
                                                           boolean embeddedAttrs)
        Deprecated.
        The authnmethods endpoint has been deprecated Use getFactors(CiServerConnection, String, String)
        Fetch the authentication methods that are owned by the provided SCIM user ID for a specific type.
        Parameters:
        connection - The CI Server Connection.
        userId - The user's SCIM ID.
        locale - The locale to use in the Accept-Language header.
        embeddedAttrs - A flag indicating if the embedded attributes of the auth method should be included (i.e. authenticator attributes).
        Returns:
        The HTTP response. Can be null if the request failed.
      • getSignatureAuthMethods

        public static HttpResponse getSignatureAuthMethods​(CiServerConnection connection,
                                                           java.lang.String userId,
                                                           java.lang.String locale,
                                                           boolean embeddedAttrs,
                                                           java.lang.String search)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use getFactors(CiServerConnection, String, String)
        Fetch the authentication methods that are owned by the provided SCIM user ID for a specific type.
        Parameters:
        connection - The CI Server Connection.
        userId - The user's SCIM ID.
        locale - The locale to use in the Accept-Language header.
        embeddedAttrs - A flag indicating if the embedded attributes of the auth method should be included (i.e. authenticator attributes).
        search - The search parameters to apply to the request. Must be of the form attribute=value. For example: "isValidated=true"
        Returns:
        The HTTP response. Can be null if the request failed.
      • getAuthMethod

        public static HttpResponse getAuthMethod​(CiServerConnection connection,
                                                 java.lang.String type,
                                                 java.lang.String id)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use getFactor(CiServerConnection, String, String, String)
        Fetch a specific authentication method with the given type and ID.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "totp", "emailotp", or "smsotp".
        id - The ID of the authentication method
        Returns:
        The HTTP response. Can be null if the request failed.
      • getAuthMethod

        public static HttpResponse getAuthMethod​(CiServerConnection connection,
                                                 java.lang.String type,
                                                 java.lang.String id,
                                                 java.lang.String locale)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use getFactor(CiServerConnection, String, String, String)
        Fetch a specific authentication method with the given type and ID.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "totp", "emailotp", or "smsotp".
        id - The ID of the authentication method
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • enrollAuthMethod

        public static HttpResponse enrollAuthMethod​(CiServerConnection connection,
                                                    java.lang.String type,
                                                    java.lang.String json,
                                                    boolean respAsJson)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use enrollFactor(CiServerConnection, String, String, String, String)
        Enroll an authentication method with provided type and JSON payload.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "totp", "emailotp", or "smsotp".
        json - The JSON payload of the enrollment.
        respAsJson - A boolean indicating if the response should be JSON or an image.
        Returns:
        The HTTP response. Can be null if the request failed.
      • enrollAuthMethod

        public static HttpResponse enrollAuthMethod​(CiServerConnection connection,
                                                    java.lang.String type,
                                                    java.lang.String json,
                                                    boolean respAsJson,
                                                    java.lang.String locale)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use enrollFactor(CiServerConnection, String, String, String, String)
        Enroll an authentication method with provided type and JSON payload.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "totp", "emailotp", or "smsotp".
        json - The JSON payload of the enrollment.
        respAsJson - A boolean indicating if the response should be JSON or an image.
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • updateAuthMethod

        public static HttpResponse updateAuthMethod​(CiServerConnection connection,
                                                    java.lang.String type,
                                                    java.lang.String id,
                                                    java.lang.String json)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use updateFactor(CiServerConnection, String, String, String, String)
        Update a specific authentication method with the provided ID, type, and JSON payload.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "totp", "emailotp", or "smsotp".
        id - The ID of the authentication method
        json - The JSON payload of the enrollment.
        Returns:
        The HTTP response. Can be null if the request failed.
      • updateAuthMethod

        public static HttpResponse updateAuthMethod​(CiServerConnection connection,
                                                    java.lang.String type,
                                                    java.lang.String id,
                                                    java.lang.String json,
                                                    java.lang.String locale)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use updateFactor(CiServerConnection, String, String, String, String)
        Update a specific authentication method with the provided ID, type, and JSON payload.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "totp", "emailotp", or "smsotp".
        id - The ID of the authentication method
        json - The JSON payload of the enrollment.
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • deleteAuthMethod

        public static HttpResponse deleteAuthMethod​(CiServerConnection connection,
                                                    java.lang.String type,
                                                    java.lang.String id)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use deleteFactor(CiServerConnection, String, String, String)
        Delete a specific authentication method with the provided ID and type.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "totp", "emailotp", or "smsotp".
        id - The ID of the authentication method
        Returns:
        The HTTP response. Can be null if the request failed.
      • deleteAuthMethod

        public static HttpResponse deleteAuthMethod​(CiServerConnection connection,
                                                    java.lang.String type,
                                                    java.lang.String id,
                                                    java.lang.String locale)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use deleteFactor(CiServerConnection, String, String, String)
        Delete a specific authentication method with the provided ID and type.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "totp", "emailotp", or "smsotp".
        id - The ID of the authentication method
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • getValidation

        public static HttpResponse getValidation​(CiServerConnection connection,
                                                 java.lang.String type,
                                                 java.lang.String id,
                                                 java.lang.String validationId)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use getFactorVerification(CiServerConnection, String, String, String, String)
        Fetch the details of an authentication method validation request. Validations are performed at enrollment time to confirm the user owns the OTP delivery details (email, phone number), whereas verifications are the runtime authentication.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "emailotp", or "smsotp".
        id - The ID of the authentication method
        validationId - The ID of the validation
        Returns:
        The HTTP response. Can be null if the request failed.
      • getValidation

        public static HttpResponse getValidation​(CiServerConnection connection,
                                                 java.lang.String type,
                                                 java.lang.String id,
                                                 java.lang.String validationId,
                                                 java.lang.String locale)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use getFactorVerification(CiServerConnection, String, String, String, String)
        Fetch the details of an authentication method validation request. Validations are performed at enrollment time to confirm the user owns the OTP delivery details (email, phone number), whereas verifications are the runtime authentication.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "emailotp", or "smsotp".
        id - The ID of the authentication method
        validationId - The ID of the validation
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • validateOTP

        public static HttpResponse validateOTP​(CiServerConnection connection,
                                               java.lang.String type,
                                               java.lang.String id,
                                               java.lang.String validationId,
                                               java.lang.String json)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use verifyFactor(CiServerConnection, String, String, String, String, String)
        Complete the specified validation with the provided OTP payload.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "emailotp", or "smsotp".
        id - The ID of the authentication method
        validationId - The ID of the validation
        json - The JSON payload of the validation.
        Returns:
        The HTTP response. Can be null if the request failed.
      • validateOTP

        public static HttpResponse validateOTP​(CiServerConnection connection,
                                               java.lang.String type,
                                               java.lang.String id,
                                               java.lang.String validationId,
                                               java.lang.String json,
                                               java.lang.String locale)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use verifyFactor(CiServerConnection, String, String, String, String, String)
        Complete the specified validation with the provided OTP payload.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "emailotp", or "smsotp".
        id - The ID of the authentication method
        validationId - The ID of the validation
        json - The JSON payload of the validation.
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • createVerification

        public static HttpResponse createVerification​(CiServerConnection connection,
                                                      java.lang.String type,
                                                      java.lang.String id,
                                                      java.lang.String json)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use createFactorVerification(CiServerConnection, String, String, String, String)
        Create a verification for the specific enrollment.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "emailotp", or "smsotp".
        id - The ID of the authentication method
        json - The JSON payload of the enrollment.
        Returns:
        The HTTP response. Can be null if the request failed.
      • createVerification

        public static HttpResponse createVerification​(CiServerConnection connection,
                                                      java.lang.String type,
                                                      java.lang.String id,
                                                      java.lang.String json,
                                                      java.lang.String locale)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use createFactorVerification(CiServerConnection, String, String, String, String)
        Create a verification for the specific enrollment.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "emailotp", or "smsotp".
        id - The ID of the authentication method
        json - The JSON payload of the enrollment.
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • createTransientVerification

        public static HttpResponse createTransientVerification​(CiServerConnection connection,
                                                               java.lang.String type,
                                                               java.lang.String json)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use createFactorVerification(CiServerConnection, String, String, String, String)
        Create a transient verification, which does not require an enrollment.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "emailotp", or "smsotp".
        json - The JSON payload of the verification.
        Returns:
        The HTTP response. Can be null if the request failed.
      • createTransientVerification

        public static HttpResponse createTransientVerification​(CiServerConnection connection,
                                                               java.lang.String type,
                                                               java.lang.String json,
                                                               java.lang.String locale)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use createFactorVerification(CiServerConnection, String, String, String, String)
        Create a transient verification, which does not require an enrollment.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "emailotp", or "smsotp".
        json - The JSON payload of the verification.
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • getVerifications

        public static HttpResponse getVerifications​(CiServerConnection connection,
                                                    java.lang.String type,
                                                    java.lang.String id)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use getFactorVerifications(CiServerConnection, String, String, String)
        Fetch a list of verifications for the provided method ID.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "emailotp", or "smsotp".
        id - The ID of the authentication method
        Returns:
        The HTTP response. Can be null if the request failed.
      • getVerifications

        public static HttpResponse getVerifications​(CiServerConnection connection,
                                                    java.lang.String type,
                                                    java.lang.String id,
                                                    java.lang.String locale)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use getFactorVerifications(CiServerConnection, String, String, String)
        Fetch a list of verifications for the provided method ID.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "emailotp", or "smsotp".
        id - The ID of the authentication method
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • getVerification

        public static HttpResponse getVerification​(CiServerConnection connection,
                                                   java.lang.String type,
                                                   java.lang.String id,
                                                   java.lang.String verificationId)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use getFactorVerification(CiServerConnection, String, String, String, String)
        Fetch a specific verifications for the provided verification ID.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "emailotp", or "smsotp".
        id - The ID of the authentication method
        verificationId - The ID of the verification
        Returns:
        The HTTP response. Can be null if the request failed.
      • getVerification

        public static HttpResponse getVerification​(CiServerConnection connection,
                                                   java.lang.String type,
                                                   java.lang.String id,
                                                   java.lang.String verificationId,
                                                   java.lang.String locale)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use getFactorVerification(CiServerConnection, String, String, String, String)
        Fetch a specific verifications for the provided verification ID.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "emailotp", or "smsotp".
        id - The ID of the authentication method
        verificationId - The ID of the verification
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • verifyTOTP

        public static HttpResponse verifyTOTP​(CiServerConnection connection,
                                              java.lang.String id,
                                              java.lang.String json)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use verifyTOTPFactor(CiServerConnection, String, String, String)
        Complete a TOTP verification with the provided OTP payload.
        Parameters:
        connection - The CI Server Connection.
        id - The ID of the authentication method
        json - The JSON payload of the verification.
        Returns:
        The HTTP response. Can be null if the request failed.
      • verifyTOTP

        public static HttpResponse verifyTOTP​(CiServerConnection connection,
                                              java.lang.String id,
                                              java.lang.String json,
                                              java.lang.String locale)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use verifyTOTPFactor(CiServerConnection, String, String, String)
        Complete a TOTP verification with the provided OTP payload.
        Parameters:
        connection - The CI Server Connection.
        id - The ID of the authentication method
        json - The JSON payload of the verification.
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • verifyOTP

        public static HttpResponse verifyOTP​(CiServerConnection connection,
                                             java.lang.String type,
                                             java.lang.String id,
                                             java.lang.String verificationId,
                                             java.lang.String json)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use verifyFactor(CiServerConnection, String, String, String, String, String)
        Complete a verification with the provided OTP payload for the specific authentication method enrollment.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "emailotp", or "smsotp".
        id - The ID of the authentication method
        verificationId - The ID of the verification
        json - The JSON payload of the verification.
        Returns:
        The HTTP response. Can be null if the request failed.
      • verifyOTP

        public static HttpResponse verifyOTP​(CiServerConnection connection,
                                             java.lang.String type,
                                             java.lang.String id,
                                             java.lang.String verificationId,
                                             java.lang.String json,
                                             java.lang.String locale)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use verifyFactor(CiServerConnection, String, String, String, String, String)
        Complete a verification with the provided OTP payload for the specific authentication method enrollment.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "emailotp", or "smsotp".
        id - The ID of the authentication method
        verificationId - The ID of the verification
        json - The JSON payload of the verification.
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • verifyTransientOTP

        public static HttpResponse verifyTransientOTP​(CiServerConnection connection,
                                                      java.lang.String type,
                                                      java.lang.String verificationId,
                                                      java.lang.String json)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use verifyFactor(CiServerConnection, String, String, String, String, String)
        Complete a transient verification with the provided OTP payload.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "emailotp", or "smsotp".
        verificationId - The ID of the verification
        json - The JSON payload of the verification.
        Returns:
        The HTTP response. Can be null if the request failed.
      • verifyTransientOTP

        public static HttpResponse verifyTransientOTP​(CiServerConnection connection,
                                                      java.lang.String type,
                                                      java.lang.String verificationId,
                                                      java.lang.String json,
                                                      java.lang.String locale)
        Deprecated.
        The authnmethods endpoint has been deprecated. Use verifyFactor(CiServerConnection, String, String, String, String, String)
        Complete a transient verification with the provided OTP payload.
        Parameters:
        connection - The CI Server Connection.
        type - The type of the authentication method. Can be one of "emailotp", or "smsotp".
        verificationId - The ID of the verification
        json - The JSON payload of the verification.
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • createTransaction

        public static HttpResponse createTransaction​(CiServerConnection connection,
                                                     java.lang.String authenticatorId,
                                                     java.lang.String json)
        Create an IBM Verify transaction.
        Parameters:
        connection - The CI Server Connection.
        authenticatorId - The ID of the authenticator
        json - The JSON payload of the transaction.
        Returns:
        The HTTP response. Can be null if the request failed.
      • createTransaction

        public static HttpResponse createTransaction​(CiServerConnection connection,
                                                     java.lang.String authenticatorId,
                                                     java.lang.String json,
                                                     java.lang.String locale)
        Create an IBM Verify transaction.
        Parameters:
        connection - The CI Server Connection.
        authenticatorId - The ID of the authenticator
        json - The JSON payload of the transaction.
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • getTransactions

        public static HttpResponse getTransactions​(CiServerConnection connection,
                                                   java.lang.String authenticatorId)
        Fetch all transactions for the provided authenticator ID.
        Parameters:
        connection - The CI Server Connection.
        authenticatorId - The ID of the authenticator
        Returns:
        The HTTP response. Can be null if the request failed.
      • getTransactions

        public static HttpResponse getTransactions​(CiServerConnection connection,
                                                   java.lang.String authenticatorId,
                                                   java.lang.String locale)
        Fetch all transactions for the provided authenticator ID.
        Parameters:
        connection - The CI Server Connection.
        authenticatorId - The ID of the authenticator
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • getTransaction

        public static HttpResponse getTransaction​(CiServerConnection connection,
                                                  java.lang.String authenticatorId,
                                                  java.lang.String id)
        Fetch a specific transaction for the provided authenticator ID.
        Parameters:
        connection - The CI Server Connection.
        authenticatorId - The ID of the authenticator
        transactionId - The ID of the transaction
        Returns:
        The HTTP response. Can be null if the request failed.
      • getTransaction

        public static HttpResponse getTransaction​(CiServerConnection connection,
                                                  java.lang.String authenticatorId,
                                                  java.lang.String transactionId,
                                                  java.lang.String locale)
        Fetch a specific transaction for the provided authenticator ID.
        Parameters:
        connection - The CI Server Connection.
        authenticatorId - The ID of the authenticator
        transactionId - The ID of the transaction
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Can be null if the request failed.
      • getRequest

        public static HttpResponse getRequest​(CiServerConnection connection,
                                              java.lang.String url)
        Generic CI get method.
        Parameters:
        connection - The CI Server Connection.
        url - The URL to GET
        Returns:
        The HTTP response. Null if invalid URL or no response.
      • getRequest

        public static HttpResponse getRequest​(CiServerConnection connection,
                                              java.lang.String url,
                                              java.lang.String locale)
        Generic CI get method.
        Parameters:
        connection - The CI Server Connection.
        url - The URL to GET
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Null if invalid URL or no response.
      • postRequest

        public static HttpResponse postRequest​(CiServerConnection connection,
                                               java.lang.String url,
                                               java.lang.String json)
        Generic CI POST method.
        Parameters:
        connection - The CI Server Connection.
        url - The URL to POST
        json - The JSON payload.
        Returns:
        The HTTP response. Null if invalid URL or no response.
      • postRequest

        public static HttpResponse postRequest​(CiServerConnection connection,
                                               java.lang.String url,
                                               java.lang.String json,
                                               java.lang.String locale)
        Generic CI POST method.
        Parameters:
        connection - The CI Server Connection.
        url - The URL to POST
        json - The JSON payload.
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Null if invalid URL or no response.
      • putRequest

        public static HttpResponse putRequest​(CiServerConnection connection,
                                              java.lang.String url,
                                              java.lang.String json)
        Generic CI PUT method.
        Parameters:
        connection - The CI Server Connection.
        url - The URL to PUT
        json - The JSON payload.
        Returns:
        The HTTP response. Null if invalid URL or no response.
      • putRequest

        public static HttpResponse putRequest​(CiServerConnection connection,
                                              java.lang.String url,
                                              java.lang.String json,
                                              java.lang.String locale)
        Generic CI PUT method.
        Parameters:
        connection - The CI Server Connection.
        url - The URL to PUT
        json - The JSON payload.
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Null if invalid URL or no response.
      • deleteRequest

        public static HttpResponse deleteRequest​(CiServerConnection connection,
                                                 java.lang.String url)
        Generic CI DELETE method.
        Parameters:
        connection - The CI Server Connection.
        url - The URL to DELETE
        Returns:
        The HTTP response. Null if invalid URL or no response.
      • deleteRequest

        public static HttpResponse deleteRequest​(CiServerConnection connection,
                                                 java.lang.String url,
                                                 java.lang.String locale)
        Generic CI DELETE method.
        Parameters:
        connection - The CI Server Connection.
        url - The URL to DELETE
        locale - The locale to use in the Accept-Language header.
        Returns:
        The HTTP response. Null if invalid URL or no response.