From 85ecf476df24b1f80bd20c790a828775320df33f Mon Sep 17 00:00:00 2001 From: Datalux Date: Tue, 9 Mar 2021 10:48:13 +0100 Subject: [PATCH 1/2] fix: authnContext to string --- src/utils/saml.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/saml.ts b/src/utils/saml.ts index 551b465c..26fd9500 100644 --- a/src/utils/saml.ts +++ b/src/utils/saml.ts @@ -164,7 +164,7 @@ const getEntrypointCerts = ( .mapNullable(r => r.query) .mapNullable(q => q.entityID) .chain(entityID => - fromNullable(idps[entityID]).map( + fromNullable(idps[entityID.toString()]).map( (idp): IEntrypointCerts => ({ cert: idp.cert.toArray(), entryPoint: idp.entryPoint, @@ -218,8 +218,8 @@ const getAuthSalmOptions = ( return fromNullable(req) .mapNullable(r => r.query) .mapNullable(q => q.authLevel) - .chain((authLevel: string) => - lookup(authLevel, SPID_LEVELS) + .chain((authLevel) => + lookup(authLevel.toString(), SPID_LEVELS) .map(authnContext => ({ authnContext, forceAuthn: authLevel !== "SpidL1" From 9c3dfb02e917bdee766ee0a6ec66ef8179630e28 Mon Sep 17 00:00:00 2001 From: Datalux Date: Tue, 9 Mar 2021 12:09:24 +0100 Subject: [PATCH 2/2] fix: linter --- src/utils/saml.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/saml.ts b/src/utils/saml.ts index 26fd9500..81aa75a5 100644 --- a/src/utils/saml.ts +++ b/src/utils/saml.ts @@ -218,7 +218,7 @@ const getAuthSalmOptions = ( return fromNullable(req) .mapNullable(r => r.query) .mapNullable(q => q.authLevel) - .chain((authLevel) => + .chain(authLevel => lookup(authLevel.toString(), SPID_LEVELS) .map(authnContext => ({ authnContext,