Skip to content

Commit

Permalink
Merge branch 'feature/logout-quick-fix' into develop #38
Browse files Browse the repository at this point in the history
* feature/logout-quick-fix:
  redirect to logout link
  frontend logout link instead of ajax call
  • Loading branch information
Tjen Wellens committed Jul 27, 2016
2 parents 86a6485 + e6cd477 commit 91a71e6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
9 changes: 0 additions & 9 deletions app/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,5 @@ function ajaxcall(url, done) {
return r; // Return it so we can cancel it * . *
}

function logout() {
ajaxcall('https://idp-qas.viaa.be/module.php/core/authenticate.php?as=viaa-ldap&logout', function(err, response) {
if(err) {}
else {
window.location.replace('logout');
}
});
}



2 changes: 1 addition & 1 deletion app/views/navigation.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<li class="menuitem"><a href="#" class="<%- activePages['about'] ? 'active' : '' %>">Over</a></li>
<li class="menuitem"><a href="#" class="<%- activePages['account'] ? 'active' : '' %>">Account</a></li>

<li class="logout"><a href="#" onclick="logout()">Uitloggen</a></li>
<li class="logout"><a href="/logout">Uitloggen</a></li>
</ul>
</header>
3 changes: 3 additions & 0 deletions server/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ var authentication = {
// URL that goes from the Service Provider -> Identity Provider
entryPoint: process.env.SAML_ENTRY_POINT || 'https://idp-qas.viaa.be/saml2/idp/SSOService.php',

// Url to logout from the Identity Provider
logoutUrl: 'https://idp-qas.viaa.be/module.php/core/authenticate.php?as=viaa-ldap&logout',

// Usually specified as `/shibboleth` from site root
issuer: process.env.ISSUER || 'passport-saml',

Expand Down
2 changes: 1 addition & 1 deletion server/routes/authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = function (app, config, passport) {

app.get('/logout', function (req, res) {
req.logout();
res.redirect('/');
res.redirect(config.passport.saml.logoutUrl);
});

app.get('/Metadata',
Expand Down

0 comments on commit 91a71e6

Please sign in to comment.