{"modulePath":"github.com/MiniMax-AI/OpenAgentCore","version":"v0.0.14","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package auth\n\nPackage auth reads the daemon credential profile written by oac-core-device: server URL, runtime row id (= device\\_id), and the long-lived runner\\_credential. Stored as JSON per-profile at ~/.oac/daemon/\\\u003cprofile\u003e/auth.json (0o600).\n\n## Variables\n\n```go\nvar ErrNotPaired = errors.New(\"auth: no daemon credential profile — create one with oac-core-device\")\n```\nErrNotPaired is returned by Load when no auth.json exists for the requested profile.\n\n## Types\n\n```go\ntype Profile struct {\n\t// ServerURL is the absolute base URL the daemon dials (no\n\t// trailing slash). The daemon joins this with paths like\n\t// /agent-daemon/bootstrap.\n\tServerURL string `json:\"server_url\"`\n\n\t// RuntimeID is the runtimes row id. The gateway uses it verbatim\n\t// as device_id on WS upgrade.\n\tRuntimeID string `json:\"runtime_id\"`\n\n\t// RunnerCredential is the bearer presented on every\n\t// /agent-daemon/* call. Stored plaintext in a 0o600 file; the\n\t// server holds only the hash, so this is the only proof of\n\t// identity and MUST NOT be checked into VCS.\n\tRunnerCredential string `json:\"runner_credential\"`\n\n\tDeviceName string `json:\"device_name,omitempty\"`\n}\n```\nProfile is the on-disk representation of one daemon credential.\n\n```go\nfunc Load(profile string) (Profile, error)\n```\nLoad reads the profile's auth.json. Returns ErrNotPaired wrapping fs.ErrNotExist when the file is missing.\n\n","path":"github.com/MiniMax-AI/OpenAgentCore/apps/daemon/internal/auth","name":"auth","synopsis":"Package auth reads the daemon credential profile written by oac-core-device: server URL, runtime row id (= device_id), and the long-lived runner_credential.","isRedistributable":true}
