Class UserPasswordAuthProviderClientImpl

    • Constructor Detail

      • UserPasswordAuthProviderClientImpl

        public UserPasswordAuthProviderClientImpl​(String providerName,
                                                  StitchRequestClient requestClient,
                                                  StitchAuthRoutes routes)
        Constructs a new User/Password authentication provider client.
        Parameters:
        providerName - the provider this client is for.
        requestClient - the request client used to make requests against Stitch.
        routes - the routes needed by the request client.
    • Method Detail

      • registerWithEmail

        public void registerWithEmail​(String email,
                                      String password)
        Registers a new user with the given email and password.
        Specified by:
        registerWithEmail in interface UserPasswordAuthProviderClient
        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.
      • confirmUser

        public void confirmUser​(String token,
                                String tokenId)
        Confirms a user with the given token and token id.
        Specified by:
        confirmUser in interface UserPasswordAuthProviderClient
        Parameters:
        token - the confirmation token.
        tokenId - the id of the confirmation token.
      • resetPassword

        public void resetPassword​(String token,
                                  String tokenId,
                                  String password)
        Resets the password of a user with the given token, token id, and new password.
        Specified by:
        resetPassword in interface UserPasswordAuthProviderClient
        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.
      • callResetPasswordFunction

        public void callResetPasswordFunction​(String email,
                                              String password,
                                              List<?> args)
        Call a reset password function configured to the provider.
        Specified by:
        callResetPasswordFunction in interface UserPasswordAuthProviderClient
        Parameters:
        email - the email of the user
        password - the new password to set
        args - arguments to be provided to the reset function