oidc: use better json based file store for objects
This commit is contained in:
@@ -1929,6 +1929,15 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
});
|
||||
};
|
||||
|
||||
Client.prototype.destroyOidcSession = function (callback) {
|
||||
del('/api/v1/oidc/sessions', null, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
if (status !== 204) return callback(new ClientError(status, data));
|
||||
|
||||
callback(null);
|
||||
});
|
||||
};
|
||||
|
||||
Client.prototype.getOidcClients = function (callback) {
|
||||
get('/api/v1/oidc/clients', null, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
|
||||
@@ -542,10 +542,9 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<p>{{ 'profile.loginTokens.description' | tr:{ webadminTokenCount: tokens.webadminTokens.length, cliTokenCount: cliTokens.length } }}</p>
|
||||
<button class="btn btn-outline btn-danger pull-right" ng-click="tokens.revokeAllWebAndCliTokens()" ng-disabled="tokens.busy"><i class="fa fa-circle-notch fa-spin" ng-show="tokens.busy"></i> {{ 'profile.loginTokens.logoutAll' | tr }}</button>
|
||||
<br/>
|
||||
<button class="btn btn-outline btn-danger pull-right" ng-click="logoutFromAll()" ng-disabled="tokens.busy"><i class="fa fa-circle-notch fa-spin" ng-show="tokens.busy"></i> {{ 'profile.loginTokens.logoutAll' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -709,6 +709,14 @@ angular.module('Application').controller('ProfileController', ['$scope', '$trans
|
||||
}
|
||||
};
|
||||
|
||||
$scope.logoutFromAll = function () {
|
||||
Client.destroyOidcSession(function (error) {
|
||||
if (error) console.error('Failed to destroy oidc session', error);
|
||||
|
||||
$scope.tokens.revokeAllWebAndCliTokens();
|
||||
});
|
||||
};
|
||||
|
||||
Client.onReady(function () {
|
||||
$scope.appPassword.refresh();
|
||||
$scope.tokens.refresh();
|
||||
|
||||
Reference in New Issue
Block a user