eslint: add no-shadow
This commit is contained in:
+4
-4
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user