v2026.2.1
All Bundles

OAuthToken

OAuth token

Operations

FormatNewToken

Formats a new token

function : FormatNewToken(access_token:String, expires_in:Int) ~ String

Parameters

NameTypeDescription
access_tokenStringaccess token
expires_inIntexpiration time

Return

TypeDescription
Stringformatted token string

GetAccessToken

Get access token

method : public : GetAccessToken() ~ String

Return

TypeDescription
Stringaccess token

GetExpiresIn

Get expiration time

method : public : GetExpiresIn() ~ Int

Return

TypeDescription
Intexpiration time

GetRefreshToken

Get refresh token

method : public : GetRefreshToken() ~ String

Return

TypeDescription
Stringrefresh token

GetScope

Get scope

method : public : GetScope() ~ String

Return

TypeDescription
Stringscope

New

Constructor

New(access_token:String, refresh_token:String, expires_in:Int, scope:String)

Parameters

NameTypeDescription
access_tokenStringaccess token
refresh_tokenStringrefresh token
expires_inIntexpiration time
scopeStringtoken scope

ReadTokenFormat

Reads and validates token format

function : ReadTokenFormat(secret_str:String) ~ String

Parameters

NameTypeDescription
secret_strStringsecret string

Return

TypeDescription
Stringtoken if valid, Nil otherwise

Set

Sets the token values

method : public : Set(access_token:String, expires_in:Int, scope:String) ~ Nil

Parameters

NameTypeDescription
access_tokenStringaccess token
expires_inIntexpiration time
scopeStringtoken scope

ToString

Get token as string

method : public : ToString() ~ String

Return

TypeDescription
Stringtoken as string