Skip to main content

Module api_key

Module api_key 

Source
Expand description

API-key sign-in: the simplest method, plus the small conveniences a CLI wants around it (env pickup and a cheap client-side shape check).

Functions§

accept
Accept a user-entered API key into a Credential, applying only a cheap client-side sanity check (non-empty, and matching the declared prefix when one exists). This never validates against the provider: that is the caller’s job on first real use, and failing here would be a silent gate.
from_env
Read the provider’s API key from its configured environment variable, if the provider declares one and it is set and non-empty.