diff --git a/README.md b/README.md index 75bc8399..22002530 100644 --- a/README.md +++ b/README.md @@ -137,16 +137,18 @@ type Profile = { * `scoping`: An optional configuration which implements the functionality [explained in the SAML spec paragraph "3.4.1.2 Element "](https://docs.oasis-open.org/security/saml/v2.0/saml-core-2.0-os.pdf). The config object is structured as following: ```javascript { - idpList: { // optional - entries: [ // required - { - providerId: 'yourProviderId', // required for each entry - name: 'yourName', // optional - loc: 'yourLoc', // optional - } - ], - getComplete: 'URI to your complete IDP list', // optional - }, + idpList: [ // optional + { + entries: [ // required + { + providerId: 'yourProviderId', // required for each entry + name: 'yourName', // optional + loc: 'yourLoc', // optional + } + ], + getComplete: 'URI to your complete IDP list', // optional + }, + ], proxyCount: 2, // optional requesterId: 'requesterId', // optional } diff --git a/src/passport-saml/types.ts b/src/passport-saml/types.ts index b7daa3a8..611c838d 100644 --- a/src/passport-saml/types.ts +++ b/src/passport-saml/types.ts @@ -59,7 +59,7 @@ export interface SamlConfig { } export interface SamlScopingConfig { - idpList: SamlIDPListConfig[]; + idpList?: SamlIDPListConfig[]; proxyCount?: number; requesterId?: string[]; } @@ -129,7 +129,7 @@ export type Profile = { samlLogoutRequest: any; user?: Profile } - + export type VerifiedCallback = (err: Error | null, user?: Record, info?: Record) => void; export type VerifyWithRequest = (req: express.Request, profile: Profile | null | undefined, done: VerifiedCallback) => void;