oauth

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CliProxyTypeToProvider = map[string]string{
	"anthropic":   "claude",
	"claude":      "claude",
	"codex":       "codex",
	"antigravity": "antigravity",
	"kimi":        "kimi",
	"meta":        "muse-code",
}

CliProxyTypeToProvider maps CLIProxyAPI types to GoRoute provider IDs.

Functions

func DefaultCliProxyDir

func DefaultCliProxyDir() string

DefaultCliProxyDir returns ~/.cli-proxy-api or CLIPROXYAPI_CONFIG_DIR env var.

Types

type ParsedCliProxyAuth

type ParsedCliProxyAuth struct {
	Provider             string                 `json:"provider"`
	Type                 string                 `json:"type"`
	Email                string                 `json:"email,omitempty"`
	AccessToken          string                 `json:"access_token,omitempty"`
	RefreshToken         string                 `json:"refresh_token,omitempty"`
	ExpiresAt            string                 `json:"expires_at,omitempty"`
	ProjectID            string                 `json:"project_id,omitempty"`
	ProviderSpecificData map[string]interface{} `json:"provider_specific_data,omitempty"`
}

ParsedCliProxyAuth represents a normalized credential from CLIProxyAPI.

func ParseCliProxyAuthRecord

func ParseCliProxyAuthRecord(raw map[string]interface{}, now time.Time) *ParsedCliProxyAuth

ParseCliProxyAuthRecord parses one json raw map into a ParsedCliProxyAuth or returns nil.

func ScanCliProxyAuthDir

func ScanCliProxyAuthDir(dir string) ([]ParsedCliProxyAuth, int, int, error)

ScanCliProxyAuthDir scans the given directory for all *.json credentials.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL