View Source Avalanche.TokenCache (Avalanche v0.12.2)

Token handling and caching.

Will create and cache a token (KEYPAIR_JWT) from a private key and details or cache a given token (OAUTH).

See: https://docs.snowflake.com/en/developer-guide/sql-api/authenticating.html

Link to this section Summary

Functions

Fetches token from the cache or creates and caches token from given options.

Link to this section Functions

@spec child_spec(any()) :: Supervisor.child_spec()
@spec fetch_token(options :: Keyword.t() | binary()) :: {binary(), binary()} | :error

Fetches token from the cache or creates and caches token from given options.

Returns {"KEYPAIR_JWT", token} or {"OAUTH", token}.

@spec start_link(any()) :: Supervisor.on_start()
Link to this function

token_from_options(token)

View Source