# IBretake auth.md

IBretake currently uses first-party account login, email OTP verification, and Flask session cookies for students, coordinators, and admins.

Self-service OAuth token issuance for third-party agents is not enabled. Agents that need API access should contact `support@ibretake.com` with the organization name, responsible human operator, intended scopes, callback URL, and data-retention policy.

## Step 1 — Discover

- API catalog: `https://ibretake.com/.well-known/api-catalog`
- OpenAPI description: `https://ibretake.com/.well-known/openapi.json`
- Authorization server metadata: `https://ibretake.com/.well-known/oauth-authorization-server`
- Protected resource metadata: `https://ibretake.com/.well-known/oauth-protected-resource`
- Agent skills: `https://ibretake.com/.well-known/agent-skills/index.json`

## Step 2 — Read agent_auth metadata

The Authorization Server metadata contains an `agent_auth` block. Agents should read that block before attempting registration. Current supported discovery fields are:

```json
{
  "register_uri": "https://ibretake.com/auth.md",
  "identity_types_supported": ["identity_assertion", "service_auth"],
  "credential_types_supported": ["oauth2_client_credentials_by_request", "first_party_session_cookie"],
  "claim_uri": "https://ibretake.com/oauth/claims",
  "revocation_uri": "https://ibretake.com/oauth/revoke"
}
```

## Step 3 — Supported scopes

`openid, profile, email, student, coordinator, admin`

## Step 4 — Registration policy

Dedicated OAuth credentials are issued by request only. Send the agent/provider name, verified operator email, intended scopes, callback URL, storage policy, and reason for access to `support@ibretake.com`.

Until IBretake issues dedicated OAuth credentials, agents should guide users through the normal student or coordinator login flow rather than asking for passwords or bypassing account verification.
