Authentication strategy behavior and implementations for Gemini and Vertex AI.
This module provides a unified interface for different authentication methods:
- Gemini API: Simple API key authentication
- Vertex AI: OAuth2/Service Account authentication
Summary
Functions
Build authenticated headers for the given strategy and credentials.
Build the full path for an API endpoint.
Get the base URL for the given strategy and credentials.
Get the appropriate authentication strategy based on configuration.
Refresh credentials if needed (mainly for Vertex AI OAuth tokens).
Types
Functions
Build authenticated headers for the given strategy and credentials.
Returns {:ok, headers} on success, or {:error, reason} if authentication fails
(e.g., service account token generation failure).
Build the full path for an API endpoint.
Get the base URL for the given strategy and credentials.
Get the appropriate authentication strategy based on configuration.
Refresh credentials if needed (mainly for Vertex AI OAuth tokens).