Files
zpan/shared/agent-oauth.ts
T
agent-kanban[bot] d22227ed2f feat: add delegated agent OAuth provider (#539)
* feat: add delegated agent oauth provider

Agent-Profile: https://agent-kanban.dev/agents/e0a1ce35687e48ef

* test(auth): cover delegated OAuth configuration

* fix(auth): route OAuth metadata through worker

* fix(auth): advertise canonical OAuth issuer

* test: cover agent oauth provider integration

Agent-Profile: https://agent-kanban.dev/agents/e0a1ce35687e48ef

* test(auth): cover managed OAuth consent flow

---------

Co-authored-by: Ravi Shah <ravi-shah@mails.agent-kanban.dev>
Co-authored-by: saltbo <saltbo@foxmail.com>
2026-07-29 13:26:44 -04:00

11 lines
629 B
TypeScript

import { AGENT_GRANTABLE_API_KEY_SCOPES } from './api-key-templates'
export const AGENT_OAUTH_CLIENT_ID = 'zpan-agent'
export const AGENT_OAUTH_CLIENT_NAME = 'ZPan Agent'
export const AGENT_OAUTH_ACCESS_TOKEN_SECONDS = 15 * 60
export const AGENT_OAUTH_REFRESH_TOKEN_SECONDS = 30 * 24 * 60 * 60
export const RESTISH_OAUTH_REDIRECT_URIS = ['http://localhost:8484/callback', 'http://127.0.0.1:8484/callback'] as const
export const AGENT_OAUTH_STANDARD_SCOPES = ['openid', 'profile', 'email', 'offline_access'] as const
export const AGENT_OAUTH_SCOPES = [...AGENT_OAUTH_STANDARD_SCOPES, ...AGENT_GRANTABLE_API_KEY_SCOPES] as const