Skip to content

Commit

Permalink
only support key value pairs for user. consumers can map for more com…
Browse files Browse the repository at this point in the history
…plex stuctures
  • Loading branch information
jimisaacs committed Mar 1, 2021
1 parent 80a5f74 commit 3704c27
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/binding-redirect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ function loginRequestRedirectURL(
}
/**
* @desc Redirect URL for logout request
* @param {Record<string, any>} user current logged user (e.g. req.user)
* @param {Record<string, string>} 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<string, any>,
user: Record<string, string>,
entity: { init: Entity; target: Entity },
relayState?: string,
customTagReplacement?: CustomTagReplacement
Expand Down
2 changes: 1 addition & 1 deletion src/entity-idp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class IdentityProvider extends Entity<IdentityProviderSettings, MetadataI
sp: ServiceProvider,
requestInfo: Partial<FlowResult<ParsedLoginRequest>>,
protocol: BindingNamespace,
user: { [key: string]: any },
user: Record<string, string>,
customTagReplacement?: CustomTagReplacement,
encryptThenSign?: boolean
) {
Expand Down
2 changes: 1 addition & 1 deletion src/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export class Entity<Settings extends EntitySettings = EntitySettings, Meta exten
createLogoutRequest(
target: Entity,
protocol: BindingNamespace,
user: Record<string, any>,
user: Record<string, string>,
relayState = '',
customTagReplacement?: CustomTagReplacement
): BindingContext | PostBindingContext {
Expand Down
4 changes: 2 additions & 2 deletions src/libsaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion test/flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const failedResponse = String(readFileSync('./test/misc/failed_response.xml'));
const createTemplateCallback = (
_idp?: IdentityProvider,
_sp?: ServiceProvider,
user?: Record<string, any>,
user?: Record<string, string>,
requestInfo?: RequestInfo
) => (template: string, values: Record<string, any>) => {
const _id = '_8e8dc5f69a98cc4c1ff3427e5ce34606fd672f91e6';
Expand Down

0 comments on commit 3704c27

Please sign in to comment.