update oauth

This commit is contained in:
lendry
2026-06-25 14:23:55 +03:00
parent c3e06e03cf
commit 1796008a28
21 changed files with 340 additions and 64 deletions

View File

@@ -177,17 +177,20 @@ export class AuthGrpcController {
}
@GrpcMethod('RbacService', 'ListOAuthClients')
async listOAuthClients() {
const clients = await this.rbac.listOAuthClients();
async listOAuthClients(command: { actorUserId: string }) {
const clients = await this.rbac.listOAuthClients(command.actorUserId);
return {
clients: clients.map((client) => ({
id: client.id,
name: client.name,
clientId: client.clientId,
redirectUris: client.redirectUris,
scopes: client.scopes.map((link) => link.scope.slug),
scopes: client.scopes,
isActive: client.isActive,
type: client.type
type: client.type,
createdById: client.createdById ?? undefined,
createdByDisplayName: client.createdByDisplayName ?? undefined,
canManage: client.canManage
}))
};
}