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.