Class Authenticator

java.lang.Object
com.example.skeddly.business.user.Authenticator

public class Authenticator extends Object
Handles the authentication of a user
  • Constructor Details

    • Authenticator

      public Authenticator(android.content.Context context, DatabaseHandler databaseHandler)
      Constructor for the Authenticator
      Parameters:
      context - The app context
      databaseHandler - The database handler
    • Authenticator

      public Authenticator(android.content.Context context, DatabaseHandler databaseHandler, boolean inTesting)
      Constructor for the Authenticator
      Parameters:
      context - The app context
      databaseHandler - The database handler
      inTesting - True if the app is in testing mode. False otherwise.
  • Method Details

    • addListenerForUserLoaded

      public void addListenerForUserLoaded(UserLoaded callback)
      Sets the callback for when the user is loaded
      Parameters:
      callback - The callback to set
    • deleteUser

      public void deleteUser()
      Deletes the user from the database
      See Also:
    • getUser

      public User getUser()
      Gets the initialized user
      Returns:
      User
    • isShowSignUp

      public boolean isShowSignUp()
      Gets if the user needs to sign up
      Returns:
      True if the signup page needs to be shown. False otherwise.
      See Also:
    • commitUserChanges

      public void commitUserChanges()
      Commits the user changes to the database
      See Also: