Interface UserPasswordAuthProviderClient

  • All Known Implementing Classes:
    UserPasswordAuthProviderClientImpl

    public interface UserPasswordAuthProviderClient
    The User/Password authentication provider client used to register users.
    • Method Detail

      • registerWithEmail

        Task<Void> registerWithEmail​(@NonNull
                                     String email,
                                     @NonNull
                                     String password)
        Registers a new user with the given email and password.
        Parameters:
        email - the email to register with. This will be the username used during log in.
        password - the password to associated with the email. The password must be between 6 and 128 characters long.
        Returns:
        A Task that completes when registration completes/fails.
      • confirmUser

        Task<Void> confirmUser​(@NonNull
                               String token,
                               @NonNull
                               String tokenId)
        Confirms a user with the given token and token id.
        Parameters:
        token - the confirmation token.
        tokenId - the id of the confirmation token.
        Returns:
        A Task that completes when confirmation completes/fails.
      • resendConfirmationEmail

        Task<Void> resendConfirmationEmail​(@NonNull
                                           String email)
        Resend the confirmation for a user to the given email.
        Parameters:
        email - the email of the user.
        Returns:
        A Task that completes when the resend request completes/fails.
      • resetPassword

        Task<Void> resetPassword​(@NonNull
                                 String token,
                                 @NonNull
                                 String tokenId,
                                 @NonNull
                                 String password)
        Resets the password of a user with the given token, token id, and new password.
        Parameters:
        token - the reset password token.
        tokenId - the id of the reset password token.
        password - the new password for the user. The password must be between 6 and 128 characters long.
        Returns:
        A Task that completes when the password reset completes/fails.
      • sendResetPasswordEmail

        Task<Void> sendResetPasswordEmail​(@NonNull
                                          String email)
        Sends a user a password reset email for the given email.
        Parameters:
        email - the email of the user.
        Returns:
        A Task that completes when the reqest request completes/fails.
      • callResetPasswordFunction

        Task<Void> callResetPasswordFunction​(String email,
                                             String password,
                                             List<?> args)
        Call a reset password function configured to the provider.
        Parameters:
        email - the email of the user
        password - the new password to set
        args - arguments to be provided to the reset function
        Returns:
        A Task that completes when the reqest request completes/fails.