@frontegg/rest-api 7.103.0 → 7.104.0-alpha.1
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 +7 -1
- package/auth/index.js +3 -0
- package/auth/interfaces.d.ts +10 -0
- package/index.js +1 -1
- package/node/auth/index.js +3 -0
- package/node/index.js +1 -1
- package/package.json +1 -1
package/auth/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export * from './enums';
|
|
|
3
3
|
export { FRONTEGG_SEPARATE_TABS_BY_TENANT } from './constants';
|
|
4
4
|
export { setTabTenantInSessionStorage, getTabTenantFromSessionStorage, getCurrentUserTenantsFunction, removeTabTenantFromSessionStorage, } from './utils';
|
|
5
5
|
import { ISamlRolesGroup } from '../teams/interfaces';
|
|
6
|
-
import { IAcceptInvitation, IAcceptInvitationWithOTC, IActivateAccount, IActivateAccountWithOTC, ISubmitApprovalAction, ISubmitApprovalActionResponse, IGetApprovalExecutionData, IApprovalExecutionDataResponse, IAllowedToRememberMfaDevice, ICreateSamlGroup, IDeleteApiToken, IDisableMfa, IEnrollMfaResponse, IForgotPassword, IGetActivateAccountStrategy, IGetActivateAccountStrategyResponse, IGetUserById, IGetUserPasswordConfig, ILogin, ILoginResponse, ILoginViaSocialLogin, ILoginViaSocialLoginResponse, ILoginWithMfa, IOidcPostLogin, IOidcConfiguration, IPostLogin, IPreLogin, IRecoverMFAToken, IResendActivationEmail, IResetPassword, ISamlConfiguration, ISamlVendorConfigResponse, ISignUpResponse, ISignUpUser, ISocialLoginProviderConfiguration, ITenantApiTokensData, IUpdateSamlConfiguration, IUpdateSamlGroup, IUpdateSamlRoles, IUpdateSamlVendorMetadata, IUpdateTenantApiTokensData, IUpdateUserApiTokensData, IUserApiTokensData, IUserIdResponse, IVendorConfig, IVerifyMfa, IVerifyMfaResponse, TestConfig, ISSOPublicConfiguration, IPreLoginWithIdpTypeResponse, IPasswordlessPreLogin, IPasswordlessPostLogin, ICreateSSODomain, IVerifyInviteToken, ISSODomain, ISSOConfigurationDefaultRoles, ISSOConfiguration, IUpdateSSOConfiguration, IOidcPostLoginV2, IExchangeOAuthTokens, IOAuthTokenResponse, ISocialLoginProviderConfigurationV2, ILoginResponseV2, IResetPhoneNumber, IVerifyResetPhoneNumber, IChangePhoneNumber, IVerifyResetPhoneNumberResponse, IResetPhoneNumberResponse, IWebAuthnPreLogin, IWebAuthnPostLogin, IVerifyNewWebAuthnDevice, IWebAuthnPreLoginResponse, ICreateNewDeviceSessionResponse, IAuthStrategiesConfig, ISessionResponse, IChangePhoneNumberWithVerification, IChangePhoneNumberWithVerificationResponse, IVerifyChangePhoneNumber, ISessionConfigurations, IResendInvitationEmail, IPreEnrollMFA, IEnrollMFAAuthenticatorApp, IPreEnrollMFASMS, IEnrollMFASMS, IEnrollMFAWebAuthn, IPreEnrollMFAAuthenticatorAppResponse, IPreEnrollMFAWebAuthnResponse, IVerifyMFAAuthenticatorApp, IPreVerifyMFA, IPreVerifyMFASMSResponse, IVerifyMFASMS, IPreVerifyMFAWebAuthnResponse, IVerifyMFAWebAuthn, IPreEnrollMFASMSResponse, IPreDisableMFASMSResponse, IDisableMFASMS, IDisableMFAWebAuthn, IPreDisableMFAWebAuthnResponse, UserMFADevicesResponse, WithoutMFAToken, IMFAStrategiesResponse, IOAuthLogout, IGetUserAccessTokens, IGetTenantAccessTokens, IDeleteAccessToken, ICreateTenantAccessTokenData, ICreateUserAccessTokenData, IWebAuthnDevices, ICustomSocialLoginProviderConfigurationV1, ILoginResponseV3, IPreVerifyMFAEmailCodeResponse, IVerifyMFAEmailCode, ICreateOrUpdateSSOConfigurationByMetadataUrl, GenerateStepUpRequest, GenerateStepUpResponse, TSignupStrategyResponse, IPasswordRecoveryStrategy, IForgotPasswordV2, IResetPasswordViaSmsResponse, IVerifyPasswordViaSmsRequest, IVerifyPasswordViaSmsResponse } from './interfaces';
|
|
6
|
+
import { IAcceptInvitation, IAcceptInvitationWithOTC, IActivateAccount, IActivateAccountWithOTC, ISubmitApprovalAction, ISubmitApprovalActionResponse, IGetApprovalExecutionData, IApprovalExecutionDataResponse, IAllowedToRememberMfaDevice, ICreateSamlGroup, IDeleteApiToken, IDisableMfa, IEnrollMfaResponse, IForgotPassword, IGetActivateAccountStrategy, IGetActivateAccountStrategyResponse, IGetUserById, IGetUserPasswordConfig, IValidateResetPasswordToken, ILogin, ILoginResponse, ILoginViaSocialLogin, ILoginViaSocialLoginResponse, ILoginWithMfa, IOidcPostLogin, IOidcConfiguration, IPostLogin, IPreLogin, IRecoverMFAToken, IResendActivationEmail, IResetPassword, ISamlConfiguration, ISamlVendorConfigResponse, ISignUpResponse, ISignUpUser, ISocialLoginProviderConfiguration, ITenantApiTokensData, IUpdateSamlConfiguration, IUpdateSamlGroup, IUpdateSamlRoles, IUpdateSamlVendorMetadata, IUpdateTenantApiTokensData, IUpdateUserApiTokensData, IUserApiTokensData, IUserIdResponse, IVendorConfig, IVerifyMfa, IVerifyMfaResponse, TestConfig, ISSOPublicConfiguration, IPreLoginWithIdpTypeResponse, IPasswordlessPreLogin, IPasswordlessPostLogin, ICreateSSODomain, IVerifyInviteToken, ISSODomain, ISSOConfigurationDefaultRoles, ISSOConfiguration, IUpdateSSOConfiguration, IOidcPostLoginV2, IExchangeOAuthTokens, IOAuthTokenResponse, ISocialLoginProviderConfigurationV2, ILoginResponseV2, IResetPhoneNumber, IVerifyResetPhoneNumber, IChangePhoneNumber, IVerifyResetPhoneNumberResponse, IResetPhoneNumberResponse, IWebAuthnPreLogin, IWebAuthnPostLogin, IVerifyNewWebAuthnDevice, IWebAuthnPreLoginResponse, ICreateNewDeviceSessionResponse, IAuthStrategiesConfig, ISessionResponse, IChangePhoneNumberWithVerification, IChangePhoneNumberWithVerificationResponse, IVerifyChangePhoneNumber, ISessionConfigurations, IResendInvitationEmail, IPreEnrollMFA, IEnrollMFAAuthenticatorApp, IPreEnrollMFASMS, IEnrollMFASMS, IEnrollMFAWebAuthn, IPreEnrollMFAAuthenticatorAppResponse, IPreEnrollMFAWebAuthnResponse, IVerifyMFAAuthenticatorApp, IPreVerifyMFA, IPreVerifyMFASMSResponse, IVerifyMFASMS, IPreVerifyMFAWebAuthnResponse, IVerifyMFAWebAuthn, IPreEnrollMFASMSResponse, IPreDisableMFASMSResponse, IDisableMFASMS, IDisableMFAWebAuthn, IPreDisableMFAWebAuthnResponse, UserMFADevicesResponse, WithoutMFAToken, IMFAStrategiesResponse, IOAuthLogout, IGetUserAccessTokens, IGetTenantAccessTokens, IDeleteAccessToken, ICreateTenantAccessTokenData, ICreateUserAccessTokenData, IWebAuthnDevices, ICustomSocialLoginProviderConfigurationV1, ILoginResponseV3, IPreVerifyMFAEmailCodeResponse, IVerifyMFAEmailCode, ICreateOrUpdateSSOConfigurationByMetadataUrl, GenerateStepUpRequest, GenerateStepUpResponse, TSignupStrategyResponse, IPasswordRecoveryStrategy, IForgotPasswordV2, IResetPasswordViaSmsResponse, IVerifyPasswordViaSmsRequest, IVerifyPasswordViaSmsResponse } from './interfaces';
|
|
7
7
|
import { IGetUserAuthorizationResponse, IUserProfile } from '../users/interfaces';
|
|
8
8
|
import { BaseApiClient } from '../BaseApiClient';
|
|
9
9
|
import { SecurityPolicyApi } from './secutiry-poilicy';
|
|
@@ -187,6 +187,12 @@ export declare class AuthenticationApi extends BaseApiClient {
|
|
|
187
187
|
* load password configuration for user.
|
|
188
188
|
*/
|
|
189
189
|
loadPasswordConfig: (params?: IGetUserPasswordConfig) => Promise<Partial<TestConfig> | null>;
|
|
190
|
+
/**
|
|
191
|
+
* Check whether a password-reset token is still valid (e.g. not expired or consumed).
|
|
192
|
+
* Expects Identity: POST .../users/v1/passwords/reset/validate { userId, token } → 2xx when valid.
|
|
193
|
+
* 400 (bad/missing input) and 410 (expired/consumed) are both handled as link-expired in the login box.
|
|
194
|
+
*/
|
|
195
|
+
validateResetPasswordToken: (params: IValidateResetPasswordToken) => Promise<void>;
|
|
190
196
|
/**
|
|
191
197
|
* load sign up strategies
|
|
192
198
|
*/
|
package/auth/index.js
CHANGED
|
@@ -227,6 +227,9 @@ export class AuthenticationApi extends BaseApiClient {
|
|
|
227
227
|
this.loadPasswordConfig = async params => {
|
|
228
228
|
return this.get(`${urls.identity.users.v1}/passwords/config`, params);
|
|
229
229
|
};
|
|
230
|
+
this.validateResetPasswordToken = async params => {
|
|
231
|
+
return this.post(`${urls.identity.users.v1}/passwords/reset/validate`, params);
|
|
232
|
+
};
|
|
230
233
|
this.getSignUpStrategies = async () => {
|
|
231
234
|
return this.get(`${urls.identity.signup.v1.strategies}`);
|
|
232
235
|
};
|
package/auth/interfaces.d.ts
CHANGED
|
@@ -410,6 +410,16 @@ export interface IUserIdResponse {
|
|
|
410
410
|
export interface IGetUserPasswordConfig {
|
|
411
411
|
userId: string;
|
|
412
412
|
}
|
|
413
|
+
/**
|
|
414
|
+
* Validates a password-reset token before the user submits a new password.
|
|
415
|
+
* Identity: POST .../users/v1/passwords/reset/validate with body { userId, token }.
|
|
416
|
+
* 400 = bad request / missing or invalid input; 410 = expired or consumed token.
|
|
417
|
+
* The login box shows the same link-expired UI for both responses.
|
|
418
|
+
*/
|
|
419
|
+
export interface IValidateResetPasswordToken {
|
|
420
|
+
userId: string;
|
|
421
|
+
token: string;
|
|
422
|
+
}
|
|
413
423
|
export interface IGetActivateAccountStrategy {
|
|
414
424
|
userId: string;
|
|
415
425
|
token: string;
|
package/index.js
CHANGED
package/node/auth/index.js
CHANGED
|
@@ -292,6 +292,9 @@ class AuthenticationApi extends _BaseApiClient.BaseApiClient {
|
|
|
292
292
|
this.loadPasswordConfig = async params => {
|
|
293
293
|
return this.get(`${_constants2.urls.identity.users.v1}/passwords/config`, params);
|
|
294
294
|
};
|
|
295
|
+
this.validateResetPasswordToken = async params => {
|
|
296
|
+
return this.post(`${_constants2.urls.identity.users.v1}/passwords/reset/validate`, params);
|
|
297
|
+
};
|
|
295
298
|
this.getSignUpStrategies = async () => {
|
|
296
299
|
return this.get(`${_constants2.urls.identity.signup.v1.strategies}`);
|
|
297
300
|
};
|
package/node/index.js
CHANGED