# Pixelkraft Studio auth.md

Autonomous AI Agent Authentication and Registration Specification for Pixelkraft Studio.

This document defines identity assertion, dynamic client registration, and credential usage for autonomous AI agents connecting to Pixelkraft Studio's APIs and Model Context Protocol (MCP) servers.

---

## 1. Target Audience and Scope

- Audience: Autonomous AI Agents, MCP Clients, LLM Search Fetchers, Agentic Crawlers.
- Service Root: https://pixelkraft.studio
- Protected Resource Metadata: https://pixelkraft.studio/.well-known/oauth-protected-resource
- Authorization Server: https://pixelkraft.studio/.well-known/oauth-authorization-server
- Agent Skills Index: https://pixelkraft.studio/.well-known/agent-skills/index.json

---

## 2. Agent Registration and Discovery

Autonomous agents can register or claim access tokens using the endpoints documented below.

### Discovery Endpoints
- OAuth 2.0 Authorization Server Metadata: https://pixelkraft.studio/.well-known/oauth-authorization-server
- OAuth Protected Resource Metadata: https://pixelkraft.studio/.well-known/oauth-protected-resource
- OpenID Connect Discovery: https://pixelkraft.studio/.well-known/openid-configuration
- JWKS URI: https://pixelkraft.studio/.well-known/jwks.json

### Registration and Provisioning Endpoints
- Agent Registration URI: https://pixelkraft.studio/agent/auth/register
- Credential Claim URI: https://pixelkraft.studio/agent/auth/claim
- Token Revocation URI: https://pixelkraft.studio/agent/auth/revoke

---

## 3. Supported Authentication and Identity Methods

Pixelkraft Studio supports three distinct agent authentication profiles:

### Method A: ID-JAG (Identity Assertion - JSON Web Token)
- Identity Type: identity_assertion
- Assertion Type: urn:ietf:params:oauth:token-type:id-jag
- Credential Types Supported: jwt, bearer
- Revocation URI: https://pixelkraft.studio/agent/auth/revoke
- Events Supported: urn:ietf:params:oauth:token-type:id-jag:revocation

### Method B: Verified Email
- Identity Type: identity_assertion
- Assertion Type: verified_email
- Credential Types Supported: jwt, bearer
- Claim URI: https://pixelkraft.studio/agent/auth/claim

### Method C: Anonymous / Guest Agent
- Identity Type: anonymous
- Credential Types Supported: bearer
- Claim URI: https://pixelkraft.studio/agent/auth/claim

---

## 4. Credential Usage

Agents possessing a valid Bearer token should include it in standard HTTP requests using the Authorization header:

```http
Authorization: Bearer <token>
```

- Token Format: Cryptographically signed JWT or opaque Bearer token.
- Bearer Method: header (Authorization: Bearer ...)
- Default Scopes: read, write, openid, profile, email

---

## 5. Machine-Readable Metadata

```json
{
  "resource": "https://pixelkraft.studio",
  "authorization_servers": ["https://pixelkraft.studio"],
  "agent_auth": {
    "skill": "https://pixelkraft.studio/auth.md",
    "register_uri": "https://pixelkraft.studio/agent/auth/register",
    "registration_methods_supported": ["identity_assertion", "anonymous"],
    "identity_types_supported": ["identity_assertion", "anonymous"],
    "identity_assertion": {
      "assertion_types_supported": [
        "urn:ietf:params:oauth:token-type:id-jag",
        "verified_email"
      ],
      "credential_types_supported": ["jwt", "bearer"],
      "claim_uri": "https://pixelkraft.studio/agent/auth/claim",
      "revocation_uri": "https://pixelkraft.studio/agent/auth/revoke"
    },
    "anonymous": {
      "credential_types_supported": ["bearer"],
      "claim_uri": "https://pixelkraft.studio/agent/auth/claim"
    },
    "events_supported": [
      "urn:ietf:params:oauth:token-type:id-jag:revocation"
    ]
  }
}
```
