change public app name for oauth
This commit is contained in:
@@ -307,6 +307,15 @@ export class OAuthCoreService {
|
||||
return { count: 1 };
|
||||
}
|
||||
|
||||
async getClientPublicInfo(clientId: string) {
|
||||
const client = await this.prisma.oAuthClient.findUnique({ where: { clientId } });
|
||||
if (!client?.isActive) {
|
||||
throw new BadRequestException('OAuth приложение не найдено');
|
||||
}
|
||||
|
||||
return { clientId: client.clientId, name: client.name };
|
||||
}
|
||||
|
||||
private parseScopeSlugs(scope: string) {
|
||||
return [...new Set(scope.split(/\s+/).map((item) => item.trim()).filter(Boolean))];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user