Authentication strategies for the Guava API.
Resolves credentials in the same order as the Python SDK:
- An explicit API key.
- A Guava-deploy token file at
/var/run/secrets/guava/token. - The
GUAVA_API_KEYenvironment variable. - A logged-in CLI session (
$config/guava/config.json) with OAuth refresh.
Summary
Functions
The path checked for a Guava-deploy token.
Return the auth headers for a strategy, refreshing tokens if needed.
Resolve an auth strategy from an explicit api_key (or nil) and the
environment. Raises Guava.Error (type :auth) when nothing is available.
Types
@type t() :: Guava.Auth.APIKey.t() | Guava.Auth.Deploy.t() | Guava.Auth.CLI.t()
Functions
@spec deploy_token_path() :: Path.t()
The path checked for a Guava-deploy token.
Return the auth headers for a strategy, refreshing tokens if needed.
Resolve an auth strategy from an explicit api_key (or nil) and the
environment. Raises Guava.Error (type :auth) when nothing is available.