Interface IUsersApi


  • public interface IUsersApi
    High-level methods for authenticating and authorizing a user and retrieving details about a user.
    Since:
    8.2.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • login

        IUserPortalResponse<AuthenticationTokenResponse> login​(IUserPortalInvocationContext ctx,
                                                               String clientName,
                                                               String username,
                                                               String password)
        Authenticates a user and returns the user. Throws when the user could not be authenticated.
        Parameters:
        ctx - Invocation context for communicating with the user portal REST API.
        clientName - The name of the authenticator client to use.
        username - The username of the user.
        password - The password of the user.
        Returns:
        the authenticated user.
      • downloadProfileImage

        IUserPortalResponse<Path> downloadProfileImage​(IUserPortalInvocationContext ctx)
        Retrieves the profile image of the currently authenticated user.
        Parameters:
        ctx - Invocation context for communicating with the user portal REST API.
        Returns:
        The path to the profile image.
      • verifyMfa

        IUserPortalResponse<MfaVerificationResponse> verifyMfa​(IUserPortalInvocationContext ctx,
                                                               String code,
                                                               String token,
                                                               boolean saveMfaOption)
        Verifies a multi-factor authentication (MFA) code for the currently authenticated user.
        Parameters:
        ctx - Invocation context for communicating with the user portal REST API.
        code - The MFA code to verify, typically received via email or an authenticator app.
        token - The MFA token received during the authentication process.
        Returns:
        The response indicating whether the MFA verification was successful or not.
      • sendEmailCode

        IUserPortalResponse<MfaTempTokenResponse> sendEmailCode​(IUserPortalInvocationContext ctx,
                                                                String token)
        Sends an email with a code for multi-factor authentication (MFA) to the user.
        Parameters:
        ctx - Invocation context for communicating with the user portal REST API.
        token - The MFA token received during the authentication process.
        Returns:
        The response containing the temporary token for MFA or an error if the operation failed.
      • getMfaSettings

        IUserPortalResponse<MfaSettingsResponse> getMfaSettings​(IUserPortalInvocationContext ctx)
        Retrieves the multi-factor authentication (MFA) settings.
        Parameters:
        ctx - Invocation context for communicating with the user portal REST API.
        Returns:
        The response containing the MFA settings or an error if the operation failed.