AuthTokenUtils

Methods to handle secured storage of authorization token used with Connected Car Data API

Functions

Link copied to clipboard
Link copied to clipboard
fun getSavedAuthToken(appContext: Context): String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun isTokenExpired(tokenTimestamp: Instant, tokenValidity: Int): Boolean

Checks if stored token is expired

Link copied to clipboard
fun saveAuthorizationToken(appContext: Context, token: String, expirationInMinutes: Int)