public class Utils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Utils.NormalisedInputType |
static class |
Utils.TokenType |
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static void |
fireSessionUpdateEventsIfNecessary(boolean wasLoggedIn,
int status,
java.lang.String frontTokenHeaderFromResponse) |
static java.lang.String |
getAuthorizationHeaderIfExists(boolean addRefreshToken,
android.content.Context context) |
static java.lang.String |
getFromStorage(java.lang.String name,
android.content.Context context) |
static java.lang.String |
getHostWithProtocolFromURL(java.net.URL url) |
static <T> T |
getIgnoreCase(java.util.Map<java.lang.String,T> map,
java.lang.String key) |
static com.supertokens.session.Utils.LocalSessionState |
getLocalSessionState(android.content.Context context) |
static java.lang.String |
getStorageName(Utils.TokenType tokenType) |
static java.lang.String |
getTokenForHeaderAuth(Utils.TokenType tokenType,
android.content.Context context) |
static java.lang.String |
join(java.util.AbstractCollection<java.lang.String> s,
java.lang.String delimiter) |
static void |
saveLastAccessTokenUpdate(android.content.Context context) |
static void |
saveTokenFromHeaders(okhttp3.Response response,
android.content.Context context) |
static void |
saveTokenFromHeaders(SuperTokensCustomHttpURLConnection connection,
android.content.Context context) |
static void |
setToken(Utils.TokenType tokenType,
java.lang.String value,
android.content.Context context) |
static boolean |
shouldDoInterceptionBasedOnUrl(java.lang.String toCheckUrl,
java.lang.String apiDomain,
java.lang.String cookieDomain) |
static void |
storeInStorage(java.lang.String name,
java.lang.String value,
android.content.Context context) |
public static void storeInStorage(java.lang.String name, java.lang.String value, android.content.Context context)
public static void saveLastAccessTokenUpdate(android.content.Context context)
public static java.lang.String getFromStorage(java.lang.String name, android.content.Context context)
public static com.supertokens.session.Utils.LocalSessionState getLocalSessionState(android.content.Context context)
public static java.lang.String getStorageName(Utils.TokenType tokenType)
public static void setToken(Utils.TokenType tokenType, java.lang.String value, android.content.Context context)
public static void saveTokenFromHeaders(SuperTokensCustomHttpURLConnection connection, android.content.Context context)
public static void saveTokenFromHeaders(okhttp3.Response response, android.content.Context context)
public static java.lang.String getTokenForHeaderAuth(Utils.TokenType tokenType, android.content.Context context)
public static <T> T getIgnoreCase(java.util.Map<java.lang.String,T> map, java.lang.String key)
public static java.lang.String getAuthorizationHeaderIfExists(boolean addRefreshToken, android.content.Context context)
public static void fireSessionUpdateEventsIfNecessary(boolean wasLoggedIn, int status, java.lang.String frontTokenHeaderFromResponse)
public static java.lang.String join(java.util.AbstractCollection<java.lang.String> s, java.lang.String delimiter)
public static java.lang.String getHostWithProtocolFromURL(java.net.URL url)
public static boolean shouldDoInterceptionBasedOnUrl(java.lang.String toCheckUrl, java.lang.String apiDomain, @Nullable java.lang.String cookieDomain) throws java.net.MalformedURLException
java.net.MalformedURLException