ClaudeCode.Message.AuthStatusMessage (ClaudeCode v0.36.3)

View Source

Represents an authentication status message from the Claude CLI.

Emitted during authentication flows, such as when the CLI is authenticating with the API or handling OAuth flows.

Fields

  • :is_authenticating - Whether authentication is in progress
  • :output - List of output strings from the auth process
  • :error - Error message if authentication failed (optional)
  • :uuid - Message UUID
  • :session_id - Session identifier

JSON Format

{
  "type": "auth_status",
  "isAuthenticating": true,
  "output": ["Authenticating..."],
  "uuid": "...",
  "session_id": "..."
}

Summary

Functions

Creates a new AuthStatusMessage from JSON data.

Types

t()

@type t() :: %ClaudeCode.Message.AuthStatusMessage{
  error: String.t() | nil,
  is_authenticating: boolean(),
  output: [String.t()],
  session_id: String.t(),
  type: :auth_status,
  uuid: String.t() | nil
}

Functions

new(json)

@spec new(map()) :: {:ok, t()} | {:error, atom()}

Creates a new AuthStatusMessage from JSON data.

Examples

iex> AuthStatusMessage.new(%{
...>   "type" => "auth_status",
...>   "isAuthenticating" => true,
...>   "output" => ["Authenticating..."],
...>   "session_id" => "session-1"
...> })
{:ok, %AuthStatusMessage{type: :auth_status, ...}}

iex> AuthStatusMessage.new(%{"type" => "assistant"})
{:error, :invalid_message_type}