@frontegg/rest-api 3.0.5 → 3.0.6
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/auth/index.d.ts +4 -0
- package/auth/index.js +5 -0
- package/constants.d.ts +1 -0
- package/constants.js +1 -0
- package/index.js +1 -1
- package/node/auth/index.js +8 -0
- package/node/constants.js +1 -0
- package/node/index.js +1 -1
- package/package.json +1 -1
package/auth/index.d.ts
CHANGED
|
@@ -247,6 +247,10 @@ export declare function getCurrentUserSessions(): Promise<ISessionResponse[]>;
|
|
|
247
247
|
* Get current user session
|
|
248
248
|
*/
|
|
249
249
|
export declare function getCurrentUserSession(): Promise<ISessionResponse>;
|
|
250
|
+
/**
|
|
251
|
+
* Revoke sessions for user
|
|
252
|
+
*/
|
|
253
|
+
export declare function revokeSessionsForUser(userId: string): Promise<void>;
|
|
250
254
|
/**
|
|
251
255
|
* Get session configurations
|
|
252
256
|
*/
|
package/auth/index.js
CHANGED
|
@@ -249,6 +249,11 @@ export async function getCurrentUserSessions() {
|
|
|
249
249
|
export async function getCurrentUserSession() {
|
|
250
250
|
return Get(`${urls.identity.users.sessions.currentUser.v1}/current`);
|
|
251
251
|
}
|
|
252
|
+
export async function revokeSessionsForUser(userId) {
|
|
253
|
+
return Post(`${urls.identity.users.sessions.v1}/revoke`, {
|
|
254
|
+
userId
|
|
255
|
+
});
|
|
256
|
+
}
|
|
252
257
|
export async function getSessionConfigurations() {
|
|
253
258
|
return Get(urls.identity.users.sessions.configurations.v1);
|
|
254
259
|
}
|
package/constants.d.ts
CHANGED
package/constants.js
CHANGED
package/index.js
CHANGED
package/node/auth/index.js
CHANGED
|
@@ -49,6 +49,7 @@ var _exportNames = {
|
|
|
49
49
|
signUpUser: true,
|
|
50
50
|
getCurrentUserSessions: true,
|
|
51
51
|
getCurrentUserSession: true,
|
|
52
|
+
revokeSessionsForUser: true,
|
|
52
53
|
getSessionConfigurations: true,
|
|
53
54
|
createOrUpdateSessionConfigrations: true,
|
|
54
55
|
deleteSessionForUser: true,
|
|
@@ -158,6 +159,7 @@ exports.refreshTokenV2 = refreshTokenV2;
|
|
|
158
159
|
exports.resendActivationEmail = resendActivationEmail;
|
|
159
160
|
exports.resetPassword = resetPassword;
|
|
160
161
|
exports.resetPhoneNumber = resetPhoneNumber;
|
|
162
|
+
exports.revokeSessionsForUser = revokeSessionsForUser;
|
|
161
163
|
exports.setSSODefaultRoles = setSSODefaultRoles;
|
|
162
164
|
exports.signUpUser = signUpUser;
|
|
163
165
|
exports.updateSSOConfiguration = updateSSOConfiguration;
|
|
@@ -511,6 +513,12 @@ async function getCurrentUserSession() {
|
|
|
511
513
|
return (0, _fetch.Get)(`${_constants.urls.identity.users.sessions.currentUser.v1}/current`);
|
|
512
514
|
}
|
|
513
515
|
|
|
516
|
+
async function revokeSessionsForUser(userId) {
|
|
517
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.users.sessions.v1}/revoke`, {
|
|
518
|
+
userId
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
|
|
514
522
|
async function getSessionConfigurations() {
|
|
515
523
|
return (0, _fetch.Get)(_constants.urls.identity.users.sessions.configurations.v1);
|
|
516
524
|
}
|
package/node/constants.js
CHANGED
package/node/index.js
CHANGED