eslint: add no-shadow

This commit is contained in:
Girish Ramakrishnan
2026-02-18 08:18:37 +01:00
parent 4d3e9dc49b
commit 4ed6fbbd74
40 changed files with 250 additions and 249 deletions
+4 -4
View File
@@ -129,8 +129,8 @@ class StorageAdapter {
if (client.grant_types) tmp.grant_types = client.grant_types;
if (client.appId) {
const [error, app] = await safe(apps.get(client.appId));
if (error || !app) {
const [appError, app] = await safe(apps.get(client.appId));
if (appError || !app) {
debug(`find: Unknown app for client with appId ${client.appId}`);
return null;
}
@@ -695,8 +695,8 @@ async function start() {
const [error, response] = await safe(superagent.get(`http://127.0.0.1:${constants.OIDC_PORT}${ROUTE_PREFIX}/jwks`));
if (error) return res.send(`Internal error: ${error?.message}`);
if (response.status !== 200) return res.send(`Internal error, unexpected status: ${response.status}`);
const jwksKeys = safe.JSON.parse(response.body.toString('utf8'));
const rsaKeys = jwksKeys?.keys?.filter(k => k.kty === 'RSA') || [];
const jwksResponse = safe.JSON.parse(response.body.toString('utf8'));
const rsaKeys = jwksResponse?.keys?.filter(k => k.kty === 'RSA') || [];
res.set('content-type', req.get('content-type')); // application/jwk-set+json; charset=utf-8
res.send({ keys: rsaKeys }); // https://github.com/panva/jose/discussions/654
});