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
Create a client
context.Context first and returns typed errors.
Agents and authorization
client.Delegation, client.Audit and client.Auth.
MCP servers
Plugin endpoints
Call routes declared withdefineEndpoint 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).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: