Skip to content

Commit

Permalink
Merge pull request #72 from wambotron/master
Browse files Browse the repository at this point in the history
Use logoutUrl for generateLogoutRequest
  • Loading branch information
ploer committed Jan 23, 2015
2 parents 33df15e + 42457e2 commit 225d579
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/passport-saml/saml.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ SAML.prototype.initialize = function (options) {
options.cacheProvider = new InMemoryCacheProvider(
{keyExpirationPeriodMs: options.requestIdExpirationPeriodMs });
}

if (!options.logoutUrl) {
// Default to Entry Point
options.logoutUrl = options.entryPoint || '';
}

return options;
};
Expand Down Expand Up @@ -161,7 +166,7 @@ SAML.prototype.generateLogoutRequest = function (req) {
'@ID': id,
'@Version': '2.0',
'@IssueInstant': instant,
'@Destination': this.options.entryPoint,
'@Destination': this.options.logoutUrl,
'saml:Issuer' : {
'@xmlns:saml': 'urn:oasis:names:tc:SAML:2.0:assertion',
'#text': this.options.issuer
Expand Down

0 comments on commit 225d579

Please sign in to comment.