Package net.minheur.potoflux.login
Class TokenHandler
java.lang.Object
net.minheur.potoflux.login.TokenHandler
This saves, stores and retrieve your connection token
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclear()Removes the local tokenstatic Stringget()Gets the actual stores tokenstatic booleanhas()Checks if there is a token storedstatic voidSends a request to remove the token stored locally from the serverstatic voidSaves the token in the prefs
-
Constructor Details
-
TokenHandler
public TokenHandler()
-
-
Method Details
-
save
Saves the token in the prefs- Parameters:
token- to save
-
get
Gets the actual stores token- Returns:
- the actual token,
nullif 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
-