@frontegg/rest-api 3.1.47 → 3.1.49
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 +2 -1
- package/auth/index.js +7 -1
- package/auth/interfaces.d.ts +7 -0
- package/index.js +1 -1
- package/node/auth/index.js +7 -1
- package/node/index.js +1 -1
- package/package.json +1 -1
package/auth/index.d.ts
CHANGED
|
@@ -763,5 +763,6 @@ export declare function getMeV2(): Promise<IUserProfile>;
|
|
|
763
763
|
export declare function getMeAndEntitlements(): Promise<IUserProfile>;
|
|
764
764
|
/**
|
|
765
765
|
* generate step-up session
|
|
766
|
+
* this request returns the step up details to continue step up, or the generated login response when stepped up jwt received from the BE
|
|
766
767
|
*/
|
|
767
|
-
export declare function generateStepupSession(body: GenerateStepUpRequest): Promise<GenerateStepUpResponse>;
|
|
768
|
+
export declare function generateStepupSession(body: GenerateStepUpRequest): Promise<GenerateStepUpResponse | ILoginResponseV3>;
|
package/auth/index.js
CHANGED
|
@@ -749,5 +749,11 @@ export async function getMeAndEntitlements() {
|
|
|
749
749
|
});
|
|
750
750
|
}
|
|
751
751
|
export async function generateStepupSession(body) {
|
|
752
|
-
|
|
752
|
+
const data = await Post(`${urls.identity.auth.v1}/user/step-up/generate`, body);
|
|
753
|
+
|
|
754
|
+
if (!data.accessToken) {
|
|
755
|
+
return data;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
return generateLoginResponseV3(data);
|
|
753
759
|
}
|
package/auth/interfaces.d.ts
CHANGED
|
@@ -48,6 +48,9 @@ export declare type ILoginResponse = IUserProfile & {
|
|
|
48
48
|
mfaDevices?: UserMFADevicesResponse;
|
|
49
49
|
isBreachedPassword?: boolean;
|
|
50
50
|
entitlements?: UserEntitlementsResponse | UserEntitlementsResponseV2;
|
|
51
|
+
amr?: string[];
|
|
52
|
+
acr?: string;
|
|
53
|
+
auth_time?: number;
|
|
51
54
|
};
|
|
52
55
|
export declare type ILoginResponseV2 = {
|
|
53
56
|
user: ILoginResponse;
|
|
@@ -261,6 +264,7 @@ export interface IUserApiTokensData {
|
|
|
261
264
|
description: string;
|
|
262
265
|
metadata?: any;
|
|
263
266
|
secret?: string;
|
|
267
|
+
expires?: Date;
|
|
264
268
|
}
|
|
265
269
|
export interface ITenantApiTokensData {
|
|
266
270
|
clientId?: string;
|
|
@@ -270,13 +274,16 @@ export interface ITenantApiTokensData {
|
|
|
270
274
|
metadata?: any;
|
|
271
275
|
secret?: string;
|
|
272
276
|
roleIds?: string[];
|
|
277
|
+
expires?: Date;
|
|
273
278
|
}
|
|
274
279
|
export interface IUpdateUserApiTokensData {
|
|
275
280
|
description: string;
|
|
281
|
+
expiresInMinutes: number | null;
|
|
276
282
|
}
|
|
277
283
|
export interface IUpdateTenantApiTokensData {
|
|
278
284
|
description: string;
|
|
279
285
|
roleIds: string[];
|
|
286
|
+
expiresInMinutes: number | null;
|
|
280
287
|
}
|
|
281
288
|
export interface IDeleteApiToken {
|
|
282
289
|
tokenId: string;
|
package/index.js
CHANGED
package/node/auth/index.js
CHANGED
|
@@ -1269,5 +1269,11 @@ async function getMeAndEntitlements() {
|
|
|
1269
1269
|
}
|
|
1270
1270
|
|
|
1271
1271
|
async function generateStepupSession(body) {
|
|
1272
|
-
|
|
1272
|
+
const data = await (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/step-up/generate`, body);
|
|
1273
|
+
|
|
1274
|
+
if (!data.accessToken) {
|
|
1275
|
+
return data;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
return generateLoginResponseV3(data);
|
|
1273
1279
|
}
|
package/node/index.js
CHANGED