API Reference
Class
CodexAuthStore
Utilities for working with Codex auth.json files.
Inheritance
- Object
- CodexAuthStore
Methods
public static String BuildAuthJson(AuthBundle bundle, DateTimeOffset? lastRefresh = null, String? openAiApiKey = null) #Returns:
StringBuilds Codex auth.json content from an auth bundle.
Parameters
- bundle IntelligenceX.OpenAI.Auth.AuthBundle
- Auth bundle.
- lastRefresh System.DateTimeOffset? = null
- Optional refresh timestamp.
- openAiApiKey System.String? = null
- Optional API key to embed.
public static String ResolveAuthPath(String? codexHome = null) #Returns:
StringResolves the Codex auth.json path.
Parameters
- codexHome System.String? = null
- Optional override Codex home.
public static String ResolveCodexHome() #Returns:
StringResolves the Codex home directory, honoring CODEX_HOME when set.
public static AuthBundle? TryReadBundle(String authPath) #Returns:
AuthBundle?Reads a ChatGPT OAuth bundle from a Codex auth.json file.
Parameters
- authPath System.String
public static CodexAuthProfile? TryReadProfile(String authPath) #Returns:
CodexAuthProfile?Reads a best-effort Codex auth profile from auth.json.
Parameters
- authPath System.String
public static Void WriteAuthJson(AuthBundle bundle, String? codexHome = null, DateTimeOffset? lastRefresh = null, String? openAiApiKey = null) #Returns:
VoidWrites Codex auth.json to disk.
Parameters
- bundle IntelligenceX.OpenAI.Auth.AuthBundle
- Auth bundle.
- codexHome System.String? = null
- Optional Codex home override.
- lastRefresh System.DateTimeOffset? = null
- Optional refresh timestamp.
- openAiApiKey System.String? = null
- Optional API key to embed.
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?