@c8y/client 1016.258.0 → 1016.259.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bundles/client.umd.js +16 -0
- package/lib/bundles/client.umd.js.map +1 -1
- package/lib/bundles/client.umd.min.js +1 -1
- package/lib/bundles/client.umd.min.js.map +1 -1
- package/lib/cjs/src/user/UserService.js +14 -0
- package/lib/cjs/src/user/UserService.js.map +1 -1
- package/lib/esm2015/src/user/UserService.js +16 -0
- package/lib/esm2015/src/user/UserService.js.map +1 -1
- package/lib/src/user/UserService.d.ts +7 -0
- package/package.json +1 -1
|
@@ -7203,6 +7203,9 @@
|
|
|
7203
7203
|
get currentUserPasswordUrl() {
|
|
7204
7204
|
return `${this.currentUserUrl}/password`;
|
|
7205
7205
|
}
|
|
7206
|
+
get revokeAllTokensUrl() {
|
|
7207
|
+
return `/logout/${this.client.tenant}/allUsers`;
|
|
7208
|
+
}
|
|
7206
7209
|
/**
|
|
7207
7210
|
* Gets the details of given user.
|
|
7208
7211
|
*
|
|
@@ -7695,6 +7698,19 @@
|
|
|
7695
7698
|
return { res, data: null };
|
|
7696
7699
|
});
|
|
7697
7700
|
}
|
|
7701
|
+
/**
|
|
7702
|
+
* Revoke tokens for all users. All users logged with "OAI-Secure" or "Single sign-on redirect" will be logged out.
|
|
7703
|
+
*
|
|
7704
|
+
* @returns Returns a result object.
|
|
7705
|
+
*/
|
|
7706
|
+
revokeTokens() {
|
|
7707
|
+
return __awaiter$14(this, void 0, void 0, function* () {
|
|
7708
|
+
const method = 'POST';
|
|
7709
|
+
const headers = { 'content-type': 'application/json' };
|
|
7710
|
+
const res = yield this.fetch(this.revokeAllTokensUrl, { headers, method });
|
|
7711
|
+
return { res, data: null };
|
|
7712
|
+
});
|
|
7713
|
+
}
|
|
7698
7714
|
hasRole(user, roleId) {
|
|
7699
7715
|
return this.hasRoleInUser(user, roleId) || this.hasRoleInGroups(user, roleId);
|
|
7700
7716
|
}
|