Class TokenHandler

java.lang.Object
net.minheur.potoflux.login.TokenHandler

public class TokenHandler extends Object
This saves, stores and retrieve your connection token
  • Constructor Details

    • TokenHandler

      public TokenHandler()
  • Method Details

    • save

      public static void save(String token)
      Saves the token in the prefs
      Parameters:
      token - to save
    • get

      public static String get()
      Gets the actual stores token
      Returns:
      the actual token, null if none
    • clear

      public static void clear()
      Removes the local token
    • has

      public static boolean has()
      Checks if there is a token stored
      Returns:
      if there's a token
    • rmOnlineToken

      public static void rmOnlineToken()
      Sends a request to remove the token stored locally from the server