passport-saml
- Version 3.2.4
- Published
- 257 kB
- 7 dependencies
- MIT license
Install
npm i passport-saml
yarn add passport-saml
pnpm add passport-saml
Overview
SAML 2.0 authentication strategy for Passport
Index
Classes
Interfaces
Classes
class CacheProvider
class CacheProvider {}
constructor
constructor(options: Partial<CacheProviderOptions>);
property cacheKeys
cacheKeys: Record<string, CacheItem>;
property options
options: CacheProviderOptions;
method getAsync
getAsync: (key: string) => Promise<string | null>;
Returns the value of the specified key in the cache
Parameter id
Returns
{boolean}
method removeAsync
removeAsync: (key: string) => Promise<string | null>;
Removes an item from the cache if it exists
Parameter key
method saveAsync
saveAsync: (key: string, value: string) => Promise<CacheItem | null>;
Store an item in the cache, using the specified key and value. Internally will keep track of the time the item was added to the cache
Parameter id
Parameter value
class SAML
class SAML {}
constructor
constructor(ctorOptions: SamlConfig);
property cacheProvider
cacheProvider: InMemoryCacheProvider;
property options
options: SamlOptions;
method generateServiceProviderMetadata
generateServiceProviderMetadata: ( decryptionCert: string | null, signingCert?: string | null) => string;
method getAuthorizeFormAsync
getAuthorizeFormAsync: (RelayState: string, host?: string) => Promise<string>;
method getAuthorizeUrlAsync
getAuthorizeUrlAsync: ( RelayState: string, host: string | undefined, options: AuthorizeOptions) => Promise<string>;
method getLogoutResponseUrl
getLogoutResponseUrl: ( samlLogoutRequest: Profile, RelayState: string, options: AuthenticateOptions & AuthorizeOptions, callback: (err: Error | null, url?: string | null) => void) => void;
method getLogoutUrlAsync
getLogoutUrlAsync: ( user: Profile, RelayState: string, options: AuthenticateOptions & AuthorizeOptions) => Promise<string>;
method initialize
initialize: (ctorOptions: SamlConfig) => SamlOptions;
method validatePostRequestAsync
validatePostRequestAsync: ( container: Record<string, string>) => Promise<{ profile?: Profile; loggedOut?: boolean }>;
method validatePostResponseAsync
validatePostResponseAsync: ( container: Record<string, string>) => Promise<{ profile?: Profile | null; loggedOut?: boolean }>;
method validateRedirectAsync
validateRedirectAsync: ( container: ParsedQs, originalQuery: string | null) => Promise<{ profile?: Profile | null; loggedOut?: boolean }>;
method validateSignature
validateSignature: ( fullXml: string, currentNode: Element, certs: string[]) => boolean;
Interfaces
interface CacheItem
interface CacheItem {}
Simple in memory cache provider. To be used to store state of requests that needs to be validated/checked when a response is received.
This is the default implementation of a cache provider used by Passport-SAML. For multiple server instances/load balanced scenarios (I.e. the SAML request could have been generated from a different server/process handling the SAML response) this implementation will NOT be sufficient.
The caller should provide their own implementation for a cache provider as defined in the config options for Passport-SAML.
Parameter options
Package Files (3)
Dependencies (7)
Dev Dependencies (31)
- @cjbarth/github-release-notes
- @types/debug
- @types/mocha
- @types/node
- @types/passport
- @types/passport-strategy
- @types/request
- @types/sinon
- @types/xml-crypto
- @types/xml-encryption
- @types/xml2js
- @typescript-eslint/eslint-plugin
- @typescript-eslint/parser
- body-parser
- choma
- concurrently
- eslint
- eslint-config-prettier
- eslint-plugin-prettier
- express
- mocha
- onchange
- passport
- prettier
- prettier-plugin-packagejson
- release-it
- request
- should
- sinon
- ts-node
- typescript
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/passport-saml
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/passport-saml)
- HTML<a href="https://www.jsdocs.io/package/passport-saml"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 1820 ms. - Missing or incorrect documentation? Open an issue for this package.