Add option to logout to destroy all sessions by this user
This commit is contained in:
@@ -1703,13 +1703,13 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
window.location.href = this.apiOrigin + '/api/v1/oauth/dialog/authorize?response_type=token&client_id=' + this._clientId + '&redirect_uri=' + callbackURL + '&scope=' + scope + '&state=' + state;
|
||||
};
|
||||
|
||||
Client.prototype.logout = function () {
|
||||
Client.prototype.logout = function (allSessions) {
|
||||
this.setToken(null);
|
||||
this._userInfo = {};
|
||||
|
||||
// logout from OAuth session
|
||||
var origin = window.location.protocol + '//' + window.location.host;
|
||||
window.location.href = this.apiOrigin + '/api/v1/session/logout?redirect=' + origin;
|
||||
window.location.href = this.apiOrigin + '/api/v1/session/logout?redirect=' + origin + (allSessions ? '&all=true' : '');
|
||||
};
|
||||
|
||||
// this is ununsed because webadmin uses implicit grant flow
|
||||
|
||||
Reference in New Issue
Block a user