feat(auth): add GET /keys to list available key identifiers
This commit is contained in:
@@ -40,6 +40,13 @@ export class AuthService {
|
||||
);
|
||||
}
|
||||
|
||||
listKeys(): string[] {
|
||||
if (!fs.existsSync(this.keysDir)) return [];
|
||||
return fs.readdirSync(this.keysDir)
|
||||
.filter(f => f.endsWith('.json'))
|
||||
.map(f => path.basename(f, '.json'));
|
||||
}
|
||||
|
||||
async login(keyId: string, sessionName?: string): Promise<{ token: string; sessionName: string }> {
|
||||
const resolvedSession = sessionName ?? crypto.randomUUID();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user