AuthToken

data class AuthToken(val accessToken: String? = null, val refreshToken: String? = null, val accessTokenLifetime: Long? = null, val refreshTokenLifetime: Long? = null, val payload: String? = null)(source)

Constructors

Link copied to clipboard
constructor(accessToken: String? = null, refreshToken: String? = null, accessTokenLifetime: Long? = null, refreshTokenLifetime: Long? = null, payload: String? = null)

Properties

Link copied to clipboard

This is the general access tokens/api token representing a logged in user.

Link copied to clipboard

In UnixTime (sec) when it expires

Link copied to clipboard

Sometimes AuthToken needs to be customized to store e.g. username/password, this acts as a catch all to store text or JSON data.

Link copied to clipboard

For OAuth a special refresh token is issues to refresh the access token.

Link copied to clipboard

In UnixTime (sec) when it expires

Functions

Link copied to clipboard
fun isAccessTokenExpired(marginSec: Long = 10): Boolean
Link copied to clipboard
fun isRefreshTokenExpired(marginSec: Long = 10): Boolean