# auth.md - Onyx Tech AI Agent Authentication & Registration

> Specification for AI Agents to programmatically authenticate, register, and interact with Onyx Tech APIs and services.

## Overview
- **Resource Server**: `https://onyx-tech.net`
- **Authorization Server**: `https://onyx-tech.net`
- **Protected Resource Metadata**: `https://onyx-tech.net/.well-known/oauth-protected-resource`
- **OAuth Authorization Server**: `https://onyx-tech.net/.well-known/oauth-authorization-server`
- **OpenID Configuration**: `https://onyx-tech.net/.well-known/openid-configuration`

## Authentication & Registration Methods

### 1. Anonymous / Public Access
Public read-only endpoints (company overview, services, products showcase, knowledge agent) require no credentials.
- **Endpoint**: `GET /api/company-info`, `GET /api/services`, `GET /api/products`
- **Chatbot / Inquiry Endpoint**: `POST /api/chatbot/message`, `POST /contact`

### 2. Client Credentials / Dynamic Agent Registration
For automated agent workflows requiring dedicated authentication:
- **Registration URI**: `https://onyx-tech.net/oauth/register`
- **Token Endpoint**: `https://onyx-tech.net/oauth/token`
- **Grant Types**: `client_credentials`, `authorization_code`, `refresh_token`
- **Supported Scopes**:
  - `api:read`: Read company metadata, services, and product catalogs.
  - `api:write`: Submit consultation inquiries, RFPs, and messages.
  - `inquiry:create`: Create quote requests and customer leads.

### 3. Identity Assertion (ID-JAG & Verified Email)
- **Supported Identity Types**: `identity_assertion`, `anonymous`
- **Assertion Types**: `urn:ietf:params:oauth:token-type:id-jag`, `verified_email`
- **Claim URI**: `https://onyx-tech.net/oauth/claim`
- **Revocation URI**: `https://onyx-tech.net/oauth/revoke`
- **Bearer Token Header**: `Authorization: Bearer <access_token>`

## Discovery Endpoints
- [LLMs Full Knowledge Base](https://onyx-tech.net/llms-full.txt)
- [OpenAPI 3.0 Specification](https://onyx-tech.net/openapi.json)
- [API Catalog (RFC 9727)](https://onyx-tech.net/.well-known/api-catalog)
- [Model Context Protocol (MCP)](https://onyx-tech.net/.well-known/mcp.json)
- [Agent Skills Manifest](https://onyx-tech.net/.well-known/skills.json)
