Files
autoreg-skills-max/skills/atxp-autoreg/references/atxp-oauth2-discovery.md

2.8 KiB
Raw Permalink Blame History

ATXP OAuth2 / OpenID Connect — Discovery 2026-06-24

OpenID Configuration

  • URL: https://auth.atxp.ai/.well-known/openid-configuration
  • JWKS: https://auth.atxp.ai/.well-known/jwks.json (RSA RS256, 1 key)

Endpoints

Endpoint URL
Authorization https://auth.atxp.ai/authorize
Token https://auth.atxp.ai/token
UserInfo https://auth.atxp.ai/userinfo
Introspection https://auth.atxp.ai/introspect
Revocation https://auth.atxp.ai/revoke
Registration https://auth.atxp.ai/register
End Session https://auth.atxp.ai/endsession

Grant Types

  • authorization_code
  • refresh_token
  • client_credentials
  • urn:ietf:params:oauth:grant-type:atxp-connection-token (custom, restricted)

Scopes

  • openid profile email
  • atxp.connection_token — передача connection token
  • atxp.spend — право тратить баланс (доступно для регистрации, НО токен не выдаётся внешним клиентам)
  • atxp.balance — проверка баланса

Client Registration

  • Public clients (token_endpoint_auth_method=none) могут использовать только authorization_code, refresh_token
  • Confidential clients (client_secret_post/client_secret_basic) могут использовать client_credentials
  • ПОЛЕЗНЫЕ scope (atxp.spend, atxp.balance) можно зарегистрировать
  • ACCESS TOKEN с этими scope НЕ ВЫДАЁТСЯ — сервер возвращает "invalid_grant: user credentials are invalid"
  • Custom grant type atxp-connection-token заблокирован для внешних клиентов: "unauthorized_client: grant_type is invalid"

Ключевое открытие

Попытка получить access token с scope atxp.spend:

POST /token
  grant_type=client_credentials
  client_id=<registered_client>
  client_secret=<secret>
  scope=atxp.spend atxp.balance openid

→ {"error":"invalid_grant","error_description":"Invalid grant: user credentials are invalid"}

Это означает что сервер требует привязку к ATXP user account даже для client_credentials grant. Без connection_token получить spend-права невозможно, а connection_token grant type заблокирован для внешних клиентов.

Вывод

OAuth2 путь для получения spend-прав закрыт. Единственный способ снять restricted — fund $1 через Stripe в веб-интерфейсе accounts.atxp.ai.

Client IDs (known)

  • ATXP built-in: [REDACTED-KEY] (из оauth-cache.json)
  • Self-registered: [REDACTED-KEY] (с client_secret)