Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbarth committed Sep 27, 2018
1 parent 5365e62 commit 23c618a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,20 @@ passport.use(new MultiSamlStrategy(
The profile object referenced above contains the following:

```typescript
interface Profile {
type Profile = {
issuer?: string;
sessionIndex?: string;
nameID?: string;
nameIDFormat?: string;
nameQualifier?: string;
spNameQualifier?: string;
mail?: string;
email?: string;
getAssertionXml(): string;
getAssertion(): object;
mail?: string; // InCommon Attribute urn:oid:0.9.2342.19200300.100.1.3
email?: string; // `mail` if not present in the assertion
getAssertionXml(): string; // get the raw assertion XML
getAssertion(): object; // get the assertion XML parsed as a JavaScript object
ID?: string;
} & {
[attributeName: string]: string; // arbitrary `AttributeValue`s
}
```
Expand Down
3 changes: 2 additions & 1 deletion lib/passport-saml/saml.js
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,8 @@ SAML.prototype.processValidlySignedAssertion = function(xml, inResponseTo, callb
}

if (!profile.mail && profile['urn:oid:0.9.2342.19200300.100.1.3']) {
// See http://www.incommonfederation.org/attributesummary.html for definition of attribute OIDs
// See https://spaces.internet2.edu/display/InCFederation/Supported+Attribute+Summary
// for definition of attribute OIDs
profile.mail = profile['urn:oid:0.9.2342.19200300.100.1.3'];
}

Expand Down

0 comments on commit 23c618a

Please sign in to comment.