public.oauth_authorization_codes¶
列¶
| 名称 | 类型 | 默认值 | 可空 | 子表 | 父表 | 注释 |
|---|---|---|---|---|---|---|
| clientId | varchar | false | public.oauth_clients | |||
| code | varchar(255) | false | ||||
| codeChallenge | varchar | false | ||||
| codeChallengeMethod | varchar(255) | false | ||||
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | |||
| expiresAt | bigint | false | Unix 时间戳(毫秒) | |||
| redirectUri | varchar | false | ||||
| resource | varchar | true | RFC 8707 资源指示符 URI(例如 https://n8n.example.com/mcp-server/http)。NULL = 早于资源指示符支持的旧版流程;默认值为实例的规范 MCP 资源 URL。 | |||
| scope | json | '["tool:listWorkflows","tool:getWorkflowDetails"]'::json | false | 为此授权码授予的 OAuth 范围 | ||
| state | varchar | true | ||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | |||
| used | boolean | false | false | |||
| userId | uuid | false | public.user |
约束¶
| 名称 | 类型 | 定义 |
|---|---|---|
| FK_64d965bd072ea24fb6da55468cd | FOREIGN KEY | FOREIGN KEY ("clientId") REFERENCES oauth_clients(id) ON DELETE CASCADE |
| FK_aa8d3560484944c19bdf79ffa16 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE |
| PK_fb91ab932cfbd694061501cc20f | PRIMARY KEY | PRIMARY KEY (code) |
| oauth_authorization_codes_clientId_not_null | n | NOT NULL "clientId" |
| oauth_authorization_codes_codeChallengeMethod_not_null | n | NOT NULL "codeChallengeMethod" |
| oauth_authorization_codes_codeChallenge_not_null | n | NOT NULL "codeChallenge" |
| oauth_authorization_codes_code_not_null | n | NOT NULL code |
| oauth_authorization_codes_createdAt_not_null | n | NOT NULL "createdAt" |
| oauth_authorization_codes_expiresAt_not_null | n | NOT NULL "expiresAt" |
| oauth_authorization_codes_redirectUri_not_null | n | NOT NULL "redirectUri" |
| oauth_authorization_codes_scope_not_null | n | NOT NULL scope |
| oauth_authorization_codes_updatedAt_not_null | n | NOT NULL "updatedAt" |
| oauth_authorization_codes_used_not_null | n | NOT NULL used |
| oauth_authorization_codes_userId_not_null | n | NOT NULL "userId" |
索引¶
| 名称 | 定义 |
|---|---|
| PK_fb91ab932cfbd694061501cc20f | CREATE UNIQUE INDEX "PK_fb91ab932cfbd694061501cc20f" ON public.oauth_authorization_codes USING btree (code) |
关系¶
erDiagram
"public.oauth_authorization_codes" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(id) ON DELETE CASCADE"
"public.oauth_authorization_codes" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.oauth_authorization_codes" {
varchar clientId FK
varchar_255_ code
varchar codeChallenge
varchar_255_ codeChallengeMethod
timestamp_3__with_time_zone createdAt
bigint expiresAt
varchar redirectUri
varchar resource
json scope
varchar state
timestamp_3__with_time_zone updatedAt
boolean used
uuid userId FK
}
"public.oauth_clients" {
varchar_255_ clientSecret
bigint clientSecretExpiresAt
timestamp_3__with_time_zone createdAt
json grantTypes
varchar id
boolean isFirstParty
varchar_255_ name
json redirectUris
varchar_255_ tokenEndpointAuthMethod
timestamp_3__with_time_zone updatedAt
}
"public.user" {
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
varchar_16_ kind
date lastActiveAt
varchar_32_ lastName
boolean mfaEnabled
text mfaRecoveryCodes
text mfaSecret
varchar_255_ password
json personalizationAnswers
varchar_128_ roleSlug FK
json settings
timestamp_3__with_time_zone updatedAt
}由 tbls 生成
本页原文 Markdown:在 AtomGit 查看·内容源自开源项目 n8/n8n