ClaudeCodeSDK.Auth.Provider (claude_code_sdk v0.2.2)

View Source

Multi-provider authentication abstraction.

Supports:

  • Anthropic (via claude setup-token)
  • AWS Bedrock (via AWS credentials)
  • GCP Vertex AI (via GCP credentials)

Summary

Functions

Sets up authentication token for the specified provider.

Types

provider()

@type provider() :: :anthropic | :bedrock | :vertex

Functions

setup_token(atom)

@spec setup_token(provider()) ::
  {:ok, String.t(), DateTime.t() | nil} | {:error, term()}

Sets up authentication token for the specified provider.

Returns {:ok, token, expiry} or {:error, reason}.