From 3704c279284574e62be887cd50a00e49f703924e Mon Sep 17 00:00:00 2001 From: Jim Isaacs Date: Sun, 28 Feb 2021 21:18:05 -0800 Subject: [PATCH] only support key value pairs for user. consumers can map for more complex stuctures --- src/binding-redirect.ts | 4 ++-- src/entity-idp.ts | 2 +- src/entity.ts | 2 +- src/libsaml.ts | 4 ++-- test/flow.ts | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/binding-redirect.ts b/src/binding-redirect.ts index a01b6dc5..cdeaff40 100644 --- a/src/binding-redirect.ts +++ b/src/binding-redirect.ts @@ -133,13 +133,13 @@ function loginRequestRedirectURL( } /** * @desc Redirect URL for logout request - * @param {Record} user current logged user (e.g. req.user) + * @param {Record} user current logged user (e.g. req.user) * @param {object} entity object includes both idp and sp * @param {function} customTagReplacement used when developers have their own login response template * @return {string} redirect URL */ function logoutRequestRedirectURL( - user: Record, + user: Record, entity: { init: Entity; target: Entity }, relayState?: string, customTagReplacement?: CustomTagReplacement diff --git a/src/entity-idp.ts b/src/entity-idp.ts index 56555063..4c210395 100644 --- a/src/entity-idp.ts +++ b/src/entity-idp.ts @@ -53,7 +53,7 @@ export class IdentityProvider extends Entity>, protocol: BindingNamespace, - user: { [key: string]: any }, + user: Record, customTagReplacement?: CustomTagReplacement, encryptThenSign?: boolean ) { diff --git a/src/entity.ts b/src/entity.ts index 9d56c4f1..0efe925f 100644 --- a/src/entity.ts +++ b/src/entity.ts @@ -135,7 +135,7 @@ export class Entity, + user: Record, relayState = '', customTagReplacement?: CustomTagReplacement ): BindingContext | PostBindingContext { diff --git a/src/libsaml.ts b/src/libsaml.ts index 104b7eaf..2637dbfe 100644 --- a/src/libsaml.ts +++ b/src/libsaml.ts @@ -75,8 +75,8 @@ export interface ExtractorResult { export interface LoginResponseAttribute { name: string; - nameFormat: string; // - valueXsiType: string; // + nameFormat: string; + valueXsiType: string; valueTag: string; valueXmlnsXs?: string; valueXmlnsXsi?: string; diff --git a/test/flow.ts b/test/flow.ts index b9d4a4da..a0a6d9c2 100644 --- a/test/flow.ts +++ b/test/flow.ts @@ -49,7 +49,7 @@ const failedResponse = String(readFileSync('./test/misc/failed_response.xml')); const createTemplateCallback = ( _idp?: IdentityProvider, _sp?: ServiceProvider, - user?: Record, + user?: Record, requestInfo?: RequestInfo ) => (template: string, values: Record) => { const _id = '_8e8dc5f69a98cc4c1ff3427e5ce34606fd672f91e6';