# auth.md

You are an agent. AgentFi.News supports **agentic registration** for intelligence and API workflows: discover → register → (claim if needed) → call APIs → revoke.

**What this service is:** AgentFi.News is the institutional intelligence platform for the autonomous finance sector. It monitors, in real time, the shift of capital execution toward AI agents across x402, Virtuals ACP, and onchain agent activity.

Most public intelligence surfaces are **read-only** and do not require authentication. Registration is for agents that want issued credentials for elevated or repeated API access.

## Step 1 — Discover

### 1a. Protected Resource Metadata

```http
GET https://agentfi.news/.well-known/oauth-protected-resource
```

### 1b. Authorization Server metadata (`agent_auth` block)

```http
GET https://agentfi.news/.well-known/oauth-authorization-server
```

Read `agent_auth` for:
- `skill` — this document
- `register_uri` — POST registration endpoint
- `claim_uri` / `revocation_uri`
- nested registration methods (`anonymous`, `identity_assertion`)

## Step 2 — Pick a method

1. **Anonymous** — fastest; receive an `api_key` for read/intelligence scopes
2. **identity_assertion + verified_email** — email-bound registration
3. **identity_assertion + id-jag** — provider-asserted identity when available

## Step 3 — Register

```http
POST https://agentfi.news/agent/auth
Content-Type: application/json
```

### Anonymous

```json
{ "type": "anonymous", "agent_name": "my-agent" }
```

### Verified email

```json
{
  "type": "identity_assertion",
  "assertion_type": "verified_email",
  "login_hint": "principal@example.com",
  "agent_name": "my-agent"
}
```

### ID-JAG

```json
{
  "type": "identity_assertion",
  "assertion_type": "urn:ietf:params:oauth:token-type:id-jag",
  "assertion": "<ID-JAG JWT>",
  "agent_name": "my-agent"
}
```

## Step 4 — Claim (when returned)

```http
POST https://agentfi.news/agent/auth/claim
Content-Type: application/json

{
  "claim_token": "clm_...",
  "user_code": "123456",
  "email": "principal@example.com"
}
```

## Step 5 — Use credentials

```http
Authorization: Bearer <api_key>
```

Scopes: `read`, `intelligence`, `agent_stream`.

## Revocation

```http
POST https://agentfi.news/agent/auth/revoke
Content-Type: application/json

{ "token": "<api_key>", "token_type_hint": "api_key" }
```

## Public (no auth required)

- Homepage intelligence: `GET /` with `Accept: text/markdown`
- `https://agentfi.news/llms.txt`
- `https://agentfi.news/agentfi-news.md`
- Live dashboards and Intelligence Stream (human UI)

## Contact

**info@agentfi.news** · @agentfinews
