# auth.md — DGC POS product / DGC API

Agent-oriented authentication map for DGC POS (product site) and the shared API.

## Audience

- **Agents** discovering DGC POS product docs and public APIs
- **Merchant agents** for the seller app (https://app.dgcpos.com)
- **Buyer agents** for Bazaar marketplace (https://dgcbazaar.com)

## Registration (agents)

1. Discover Protected Resource Metadata: `GET https://dgcpos.com/.well-known/oauth-protected-resource`
2. Load Authorization Server metadata: `GET https://dgcpos.com/.well-known/oauth-authorization-server`
3. Read `agent_auth` for `register_uri` / `skill` (this file)
4. Merchant sign-up / login UI: https://app.dgcpos.com/login
5. Buyer sign-up: https://dgcbazaar.com/newlogin
6. Obtain Bearer access token via documented flows
7. Call APIs with `Authorization: Bearer <token>`
8. Revoke: `POST https://api.dgcpos.com/api/auth/logout`

## Public (no auth)

- `GET https://api.dgcpos.com/api/health`
- `GET https://api.dgcpos.com/api/platform-status`
- `GET https://api.dgcpos.com/api/marketplace/public`
- Product site: https://dgcpos.com/
- Support: https://dgcpos.com/support

## Merchant (POS)

- Sign-in UI: https://app.dgcpos.com/login
- Token: `POST https://api.dgcpos.com/api/auth/login` with username/password
- Returns `token` (access JWT) + `refresh_token`
- Refresh: `POST https://api.dgcpos.com/api/auth/refresh`
- Credential use: `Authorization: Bearer <access_token>`
- Full merchant map: https://app.dgcpos.com/auth.md

## Buyer (Bazaar)

- Sign-in UI: https://dgcbazaar.com/newlogin
- Full buyer map: https://dgcbazaar.com/auth.md

## OAuth-style discovery (machine)

- Authorization Server: https://dgcpos.com/.well-known/oauth-authorization-server
- Protected Resource: https://dgcpos.com/.well-known/oauth-protected-resource
- API resource: https://api.dgcpos.com/.well-known/oauth-protected-resource
- API catalog: https://dgcpos.com/.well-known/api-catalog

## Do not

- Do not scrape authenticated merchant dashboards
- Do not embed long-lived secrets in client code

## Human docs

- Support: https://dgcpos.com/support
- Terms: https://dgcpos.com/terms
- Privacy: https://dgcpos.com/privacy
