agentauth-demo

command
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 19 Imported by: 0 modules, 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.

README

AgentAuth Demo

This demo demonstrates the agentauth server with both ID-JAG (automated) and AAuth (human consent) authorization flows.

Overview

The agentauth server combines two authorization protocols:

  1. ID-JAG (Automated): For low-risk scopes like read:*, tokens are issued automatically via token exchange
  2. AAuth (Human Consent): For sensitive scopes like write:*, human approval is required

Running the Demo

go run ./examples/agentauth-demo

What the Demo Shows

Demo 1: ID-JAG Flow (Automated)
  • Agent requests read:email read:profile scopes
  • Server evaluates policy and determines these can be auto-approved
  • Access token is issued immediately via RFC 8693 token exchange
  • Agent requests write:profile scope
  • Server evaluates policy and determines human consent is required
  • Server returns 202 Accepted with consent URI
  • Agent polls status URI while waiting for user decision
  • User approves the request (simulated)
  • Access token is issued after approval

Server Endpoints

Once running, the server exposes:

Endpoint Description
/.well-known/aauth-configuration AAuth discovery metadata
/.well-known/jwks.json Public key set
/oauth/token ID-JAG token exchange
/aauth/authorize AAuth authorization request
/aauth/consent/{id} Consent page for user
/aauth/consent/status/{id} Poll consent status

Policy Configuration

The demo seeds the following scope policies:

Pattern Protocol Description
read:* ID-JAG Auto-approved
write:* AAuth Requires human consent

Architecture

┌──────────────────────────────────────────────────────────────┐
│                    agentauth-server                          │
│                                                              │
│  ┌─────────────────────┐    ┌─────────────────────┐         │
│  │   Person Server     │    │   AuthZ Server      │         │
│  │   (AAuth Protocol)  │    │   (ID-JAG Protocol) │         │
│  │                     │    │                     │         │
│  │  - Consent UI       │    │  - Token Exchange   │         │
│  │  - Mission Tracking │    │  - Policy Eval      │         │
│  │  - Token Issuance   │    │  - Introspection    │         │
│  └─────────────────────┘    └─────────────────────┘         │
│                                                              │
│  ┌──────────────────────────────────────────────────────┐   │
│  │                  Shared Store (SQLite)                │   │
│  │  Users | Agents | Missions | Tokens | Policies        │   │
│  └──────────────────────────────────────────────────────┘   │
└──────────────────────────────────────────────────────────────┘

Documentation

Overview

Command agentauth-demo demonstrates the agentauth server with both ID-JAG (automated) and AAuth (human consent) authorization flows.

This demo:

  1. Starts an agentauth server
  2. Creates a demo user and agent
  3. Demonstrates ID-JAG flow for read scopes (auto-approved)
  4. Demonstrates AAuth flow for write scopes (requires human consent)
  5. Shows how to poll for consent status

Run: go run ./examples/agentauth-demo

Jump to

Keyboard shortcuts

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