Add OAuth client list and revoke endpoints

Superuser-only management for agents that registered themselves: list them
with whether anyone approved them, and withdraw one without rotating the
signing key and cutting off every other agent.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H7LwYgJfpkbLCTeiAf8U4A
This commit is contained in:
2026-08-16 16:29:47 +02:00
co-authored by Claude Fable 5
parent 19970b0ad8
commit f239c884b6
5 changed files with 264 additions and 4 deletions
+65
View File
@@ -1375,6 +1375,71 @@ export const PrivateUserCreateSchema = {
title: 'PrivateUserCreate'
} as const;
export const RegisteredClientSchema = {
properties: {
id: {
type: 'string',
format: 'uuid',
title: 'Id'
},
client_name: {
type: 'string',
title: 'Client Name'
},
redirect_uris: {
items: {
type: 'string'
},
type: 'array',
title: 'Redirect Uris'
},
created_at: {
type: 'string',
format: 'date-time',
title: 'Created At'
},
active_tokens: {
type: 'integer',
title: 'Active Tokens'
},
last_authorized_at: {
anyOf: [
{
type: 'string',
format: 'date-time'
},
{
type: 'null'
}
],
title: 'Last Authorized At'
}
},
type: 'object',
required: ['id', 'client_name', 'redirect_uris', 'created_at', 'active_tokens', 'last_authorized_at'],
title: 'RegisteredClient',
description: 'A registered agent, and whether anyone actually let it in.'
} as const;
export const RegisteredClientsSchema = {
properties: {
data: {
items: {
'$ref': '#/components/schemas/RegisteredClient'
},
type: 'array',
title: 'Data'
},
count: {
type: 'integer',
title: 'Count'
}
},
type: 'object',
required: ['data', 'count'],
title: 'RegisteredClients'
} as const;
export const RuleSchema = {
properties: {
events: {