From 1427383bb67f296063e7952d0dce0201732c29ba Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Wed, 10 Mar 2021 07:50:38 +0100 Subject: [PATCH] fix: typo in consent detail missingOIDClaims -> missingOIDCClaims --- docs/README.md | 4 ++-- example/routes/express.js | 4 ++-- example/routes/koa.js | 4 ++-- example/views/interaction.ejs | 8 ++++---- lib/actions/interaction.js | 4 ++-- lib/helpers/interaction_policy/prompts/consent.js | 6 +++--- lib/views/interaction.js | 8 ++++---- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/README.md b/docs/README.md index 329be77fb..e45032fe5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2500,12 +2500,12 @@ new Prompt( } if (missing && missing.length) { - ctx.oidc[missingOIDClaims] = missing; + ctx.oidc[missingOIDCClaims] = missing; return Check.REQUEST_PROMPT; } return Check.NO_NEED_TO_PROMPT; - }, ({ oidc }) => ({ missingOIDClaims: oidc[missingOIDClaims] })), + }, ({ oidc }) => ({ missingOIDCClaims: oidc[missingOIDCClaims] })), // checks resource server scopes new Check('rs_scopes_missing', 'requested scopes not granted', (ctx) => { diff --git a/example/routes/express.js b/example/routes/express.js index 63cce9f80..c6ce4ea1d 100644 --- a/example/routes/express.js +++ b/example/routes/express.js @@ -130,8 +130,8 @@ module.exports = (app, provider) => { if (details.missingOIDCScope) { grant.addOIDCScope(details.missingOIDCScope.join(' ')); } - if (details.missingOIDClaims) { - grant.addOIDCClaims(details.missingOIDClaims); + if (details.missingOIDCClaims) { + grant.addOIDCClaims(details.missingOIDCClaims); } if (details.missingResourceScopes) { // eslint-disable-next-line no-restricted-syntax diff --git a/example/routes/koa.js b/example/routes/koa.js index eb0d0b7dd..deaa18f49 100644 --- a/example/routes/koa.js +++ b/example/routes/koa.js @@ -173,8 +173,8 @@ module.exports = (provider) => { if (details.missingOIDCScope) { grant.addOIDCScope(details.missingOIDCScope.join(' ')); } - if (details.missingOIDClaims) { - grant.addOIDCClaims(details.missingOIDClaims); + if (details.missingOIDCClaims) { + grant.addOIDCClaims(details.missingOIDCClaims); } if (details.missingResourceScopes) { // eslint-disable-next-line no-restricted-syntax diff --git a/example/views/interaction.ejs b/example/views/interaction.ejs index 14cd1498b..32b0d6d28 100644 --- a/example/views/interaction.ejs +++ b/example/views/interaction.ejs @@ -3,7 +3,7 @@ <% } %> -<% missingOIDClaims = new Set(details.missingOIDClaims); ['sub', 'sid', 'auth_time', 'acr', 'amr', 'iss'].forEach(Set.prototype.delete.bind(missingOIDClaims)) %> -<% if (missingOIDClaims.size) { %> +<% missingOIDCClaims = new Set(details.missingOIDCClaims); ['sub', 'sid', 'auth_time', 'acr', 'amr', 'iss'].forEach(Set.prototype.delete.bind(missingOIDCClaims)) %> +<% if (missingOIDCClaims.size) { %>
  • claims:
  • diff --git a/lib/actions/interaction.js b/lib/actions/interaction.js index 699863f78..c7739e1fe 100644 --- a/lib/actions/interaction.js +++ b/lib/actions/interaction.js @@ -131,8 +131,8 @@ your configuration is not in effect'); if (details.missingOIDCScope) { grant.addOIDCScope(details.missingOIDCScope.join(' ')); } - if (details.missingOIDClaims) { - grant.addOIDCClaims(details.missingOIDClaims); + if (details.missingOIDCClaims) { + grant.addOIDCClaims(details.missingOIDCClaims); } if (details.missingResourceScopes) { // eslint-disable-next-line no-restricted-syntax diff --git a/lib/helpers/interaction_policy/prompts/consent.js b/lib/helpers/interaction_policy/prompts/consent.js index 154d0fe63..e3a2a9b8a 100644 --- a/lib/helpers/interaction_policy/prompts/consent.js +++ b/lib/helpers/interaction_policy/prompts/consent.js @@ -5,7 +5,7 @@ const Prompt = require('../prompt'); const Check = require('../check'); const missingOIDCScope = Symbol('op_scopes_missing'); -const missingOIDClaims = Symbol('op_claims_missing'); +const missingOIDCClaims = Symbol('op_claims_missing'); const missingResourceScopes = Symbol('rs_scopes_missing'); module.exports = () => new Prompt( @@ -57,12 +57,12 @@ module.exports = () => new Prompt( } if (missing && missing.length) { - ctx.oidc[missingOIDClaims] = missing; + ctx.oidc[missingOIDCClaims] = missing; return Check.REQUEST_PROMPT; } return Check.NO_NEED_TO_PROMPT; - }, ({ oidc }) => ({ missingOIDClaims: oidc[missingOIDClaims] })), + }, ({ oidc }) => ({ missingOIDCClaims: oidc[missingOIDCClaims] })), // checks resource server scopes new Check('rs_scopes_missing', 'requested scopes not granted', (ctx) => { diff --git a/lib/views/interaction.js b/lib/views/interaction.js index da1d1da97..3cee99432 100644 --- a/lib/views/interaction.js +++ b/lib/views/interaction.js @@ -3,7 +3,7 @@ module.exports = `
    <% } %> -<% missingOIDClaims = new Set(details.missingOIDClaims); ['sub', 'sid', 'auth_time', 'acr', 'amr', 'iss'].forEach(Set.prototype.delete.bind(missingOIDClaims)) %> -<% if (missingOIDClaims.size) { %> +<% missingOIDCClaims = new Set(details.missingOIDCClaims); ['sub', 'sid', 'auth_time', 'acr', 'amr', 'iss'].forEach(Set.prototype.delete.bind(missingOIDCClaims)) %> +<% if (missingOIDCClaims.size) { %>
  • claims: