auth.md

auth.md

GitHub: https://github.com/workos/auth.md

⭐ 星星數: 640

摘要: auth.md 定義了「agentic registration」協議:agent 如何代替用戶向服務完成身分註冊與驗證。服務端只需在網域上部署一份 AUTH.md 檔案,agent 就能據此學會如何與之認證。

技術堆疊: TypeScript, OAuth, ID-JAG, RFC 8628, RFC 7523, pnpm

架構: 協議包含三種角色:代表用戶行動的 agent、鑄造身分斷言(ID-JAG,對應 IETF Identity Assertion 授權授予草案)的 agent provider、以及接受斷言並簽發憑證的 service;若 agent 不綁定用戶身分或 provider 不支援 ID-JAG,則退回 RFC 8628 式的 claim ceremony 完成驗證。倉庫提供兩側樣板:agent-services 是資源伺服器+授權伺服器(POST /agent/identity 簽發 identity_assertion,再以 RFC 7523 JWT-bearer 到 /oauth2/token 換 access_token),agent-providers 則是鑄造 ID-JAG、發布 JWKS 與撤銷事件的 agent IdP,兩者共用 shared/ 的型別與端口套件。服務發現掛在 /.well-known/oauth-authorization-server,pnpm dev 即可同時跑起兩端互動示範。