Skip to main content
github.com/glincker/theauth-go is the Go client for a theAuth server. It talks to the same REST API as @glinr/theauth-client. This is a client, not the Go server library.

Installation

Requires Go 1.21 or newer. No external dependencies.

Create a client

Every method takes a context.Context first and returns typed errors.

Agents and authorization

Delegation, audit and human auth live on client.Delegation, client.Audit and client.Auth.

MCP servers

Plugin endpoints

Call routes declared with defineEndpoint on the server.
client.Do(ctx, method, path, query, body, &out) is the short form without path parameters.

Errors

All error types embed TheAuthError with Code, Message, StatusCode, Details and Issues.

DPoP

Bind tokens to a key with RFC 9449 proofs. The prover uses the standard library only (ECDSA P-256, ES256).
Each request carries a DPoP proof with htm, htu (no query or fragment), iat, jti and ath when a token is sent. A Bearer token is sent as Authorization: DPoP <token>. The DPoP-Nonce header is cached per origin and a use_dpop_nonce challenge is retried once. To wrap your own http.Client:
Last modified on October 13, 2026