Skip to content

Commit a5719e9

Browse files
authored
Reference node-saml documentation from README (#815)
1 parent 6eb1eb3 commit a5719e9

File tree

1 file changed

+5
-28
lines changed

1 file changed

+5
-28
lines changed

README.md

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -106,32 +106,13 @@ passport.use(
106106

107107
The options passed when the `MultiSamlStrategy` is initialized are also passed as default values to each provider. e.g. If you provide an `issuer` on `MultiSamlStrategy`, this will be also a default value for every provider. You can override these defaults by passing a new value through the `getSamlOptions` function.
108108

109-
Using multiple providers supports `validateInResponseTo`, but all the `InResponse` values are stored on the same Cache. This means, if you're using the default `InMemoryCache`, that all providers have access to it and a provider might get its response validated against another's request. [Issue Report](!https://github.com/node-saml/passport-saml/issues/334). To amend this you should provide a different cache provider per SAML provider, through the `getSamlOptions` function.
109+
Using multiple providers supports `validateInResponseTo`, but all the `InResponse` values are stored on the same Cache. This means, if you're using the default `InMemoryCache`, that all providers have access to it and a provider might get its response validated against another's request. [Issue Report](https://github.com/node-saml/passport-saml/issues/334). To amend this you should provide a different cache provider per SAML provider, through the `getSamlOptions` function.
110110

111111
Please note that in the above examples, `findProvider()`, `findByNameId()`, and `findByEmail()` are an examples of functions you need to implement yourself. These are just examples. You can implement this functionality any way you see fit. Please note that calling `getSamlOptions()` should result in `done()` being called with a proper SAML Configuration (see the TypeScript typings for more information) and the `done()` callbacks for the second and third arguments should be called with an object that represents the user.
112112

113-
#### The profile object
114-
115-
The profile object referenced above contains the following:
116-
117-
```typescript
118-
export interface Profile {
119-
issuer: string;
120-
sessionIndex?: string;
121-
nameID: string;
122-
nameIDFormat: string;
123-
nameQualifier?: string;
124-
spNameQualifier?: string;
125-
ID?: string;
126-
mail?: string; // InCommon Attribute urn:oid:0.9.2342.19200300.100.1.3
127-
email?: string; // `mail` if not present in the assertion
128-
["urn:oid:0.9.2342.19200300.100.1.3"]?: string;
129-
getAssertionXml?(): string; // get the raw assertion XML
130-
getAssertion?(): Record<string, unknown>; // get the assertion XML parsed as a JavaScript object
131-
getSamlResponseXml?(): string; // get the raw SAML response XML
132-
[attributeName: string]: unknown; // arbitrary `AttributeValue`s
133-
}
134-
```
113+
### The profile object
114+
115+
Please see the [type specification](https://github.com/node-saml/node-saml/blob/master/src/types.ts#:~:text=export%20interface%20profile) in `node-saml` for information about this type.
135116

136117
#### Config parameter details
137118

@@ -268,11 +249,7 @@ app.get(
268249

269250
### generateServiceProviderMetadata( decryptionCert, signingCert )
270251

271-
As a convenience, the strategy object exposes a `generateServiceProviderMetadata` method which will generate a service provider metadata document suitable for supplying to an identity provider. This method will only work on strategies which are configured with a `callbackUrl` (since the relative path for the callback is not sufficient information to generate a complete metadata document).
272-
273-
The `decryptionCert` argument should be a public certificate matching the `decryptionPvk` and is required if the strategy is configured with a `decryptionPvk`.
274-
275-
The `signingCert` argument should be a public certificate matching the `privateKey` and is required if the strategy is configured with a `privateKey`. An array of certificates can be provided to support certificate rotation. When supplying an array of certificates, the first entry in the array should match the current `privateKey`. Additional entries in the array can be used to publish upcoming certificates to IdPs before changing the `privateKey`.
252+
For details about this method, please see the [documentation](https://github.com/node-saml/node-saml#generateserviceprovidermetadata-decryptioncert-signingcert-) at `node-saml`.
276253

277254
The `generateServiceProviderMetadata` method is also available on the `MultiSamlStrategy`, but needs an extra request and a callback argument (`generateServiceProviderMetadata( req, decryptionCert, signingCert, next )`), which are passed to the `getSamlOptions` to retrieve the correct configuration.
278255

0 commit comments

Comments
 (0)