Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@frontegg/rest-api

Package Overview
Dependencies
Maintainers
1
Versions
616
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frontegg/rest-api - npm Package Compare versions

Comparing version 1.21.3 to 1.21.4

8

auth/secutiry-poilicy/index.d.ts

@@ -1,2 +0,2 @@

import { ISaveSecurityPolicy, ISaveSecurityPolicyLocout, ISaveSecurityPolicyMfa, ISecurityPolicyLockout, ISecurityPolicyMfa } from './interfaces';
import { ISaveSecurityPolicyLockout, ISaveSecurityPolicyMfa, ISecurityPolicyLockout, ISecurityPolicyMfa } from './interfaces';
/**

@@ -7,6 +7,2 @@ * Get global secure access configuration

/**
* Update global secure access configuration
*/
export declare function saveGlobalSecurityPolicy(body: ISaveSecurityPolicy): Promise<ISecurityPolicyMfa>;
/**
* Get Mfa configuration from security policy

@@ -26,2 +22,2 @@ */

*/
export declare function saveLockoutPolicy(body: ISaveSecurityPolicyLocout): Promise<ISecurityPolicyLockout>;
export declare function saveLockoutPolicy(body: ISaveSecurityPolicyLockout): Promise<ISecurityPolicyLockout>;

@@ -0,4 +1,5 @@

export declare type EnforceMFAType = 'DontForce' | 'Force' | 'ForceExceptSAML';
export interface ISecurityPolicy {
id: string;
enforceMFAType: string;
enforceMFAType?: EnforceMFAType;
createdAt: Date;

@@ -16,21 +17,5 @@ updatedAt: Date;

}
export interface ISaveSecurityPolicy {
id: string;
enforceMFAType: string;
allowOverrideEnforcePasswordHistory: boolean;
allowOverridePasswordComplexity: boolean;
allowOverridePasswordExpiration: boolean;
allowSignups: boolean;
apiTokensEnabled: boolean;
cookieSameSite: string;
defaultRefreshTokenExpiration: number;
defaultTokenExpiration: number;
}
export interface ISaveSecurityPolicyMfa {
id?: string;
enforceMFAType: string;
}
export interface ISecurityPolicyMfa {
id: string;
enforceMFAType: string;
enforceMFAType: EnforceMFAType;
createdAt: Date;

@@ -41,3 +26,3 @@ updatedAt: Date;

id?: string;
enforceMFAType: string;
enforceMFAType: EnforceMFAType;
}

@@ -51,3 +36,3 @@ export interface ISecurityPolicyLockout {

}
export interface ISaveSecurityPolicyLocout {
export interface ISaveSecurityPolicyLockout {
id?: string;

@@ -54,0 +39,0 @@ enforceLockout: boolean;

@@ -340,3 +340,70 @@ import { __awaiter, __generator, __assign, __rest } from 'tslib';

var IDENTITY_API_TOKENS_TENANTS_SERVICE = '/identity/resources/tenants/api-tokens/v1';
var SECURITY_POLICY_API_V1 = '/identity/resources/configurations/v1';
/**
* Get global secure access configuration
*/
function getGlobalSecurityPolicy() {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
console.debug('getGlobalSecurityPolicy()');
return [2 /*return*/, Get(SECURITY_POLICY_API_V1)];
});
});
}
/**
* Get Mfa configuration from security policy
*/
function getMfaPolicy() {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
console.debug('getMfaPolicy()');
return [2 /*return*/, Get(SECURITY_POLICY_API_V1 + "/mfa-policy")];
});
});
}
/**
* Create/Update Mfa configuration from security policy
*/
function saveMfaPolicy(body) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
console.debug('saveMfaPolicy()');
if (body.id) {
return [2 /*return*/, Patch(SECURITY_POLICY_API_V1 + "/mfa-policy", body)];
}
else {
return [2 /*return*/, Post(SECURITY_POLICY_API_V1 + "/mfa-policy", body)];
}
});
});
}
/**
* Get Lockout configuration from security policy
*/
function getLockoutPolicy() {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
console.debug('getLockoutPolicy()');
return [2 /*return*/, Get(SECURITY_POLICY_API_V1 + "/lockout-policy")];
});
});
}
/**
* Create/Update Lockout configuration from security policy
*/
function saveLockoutPolicy(body) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
console.debug('saveLockoutPolicy()');
if (body.id) {
return [2 /*return*/, Patch(SECURITY_POLICY_API_V1 + "/lockout-policy", body)];
}
else {
return [2 /*return*/, Post(SECURITY_POLICY_API_V1 + "/lockout-policy", body)];
}
});
});
}
/*****************************************

@@ -879,3 +946,8 @@ * Authentication

deleteUserApiToken: deleteUserApiToken,
getUserById: getUserById
getUserById: getUserById,
getGlobalSecurityPolicy: getGlobalSecurityPolicy,
getMfaPolicy: getMfaPolicy,
saveMfaPolicy: saveMfaPolicy,
getLockoutPolicy: getLockoutPolicy,
saveLockoutPolicy: saveLockoutPolicy
});

@@ -882,0 +954,0 @@

@@ -167,4 +167,3 @@ import { __awaiter, __rest } from 'tslib';

}
catch (e) {
}
catch (e) { }
if (errorMessage.errors) {

@@ -263,11 +262,2 @@ errorMessage = errorMessage.errors.join(', ');

/**
* Update global secure access configuration
*/
function saveGlobalSecurityPolicy(body) {
return __awaiter(this, void 0, void 0, function* () {
console.debug('saveGlobalSecurityPolicy()');
return Post(SECURITY_POLICY_API_V1, body);
});
}
/**
* Get Mfa configuration from security policy

@@ -747,3 +737,2 @@ */

getGlobalSecurityPolicy: getGlobalSecurityPolicy,
saveGlobalSecurityPolicy: saveGlobalSecurityPolicy,
getMfaPolicy: getMfaPolicy,

@@ -750,0 +739,0 @@ saveMfaPolicy: saveMfaPolicy,

@@ -346,3 +346,70 @@ 'use strict';

var IDENTITY_API_TOKENS_TENANTS_SERVICE = '/identity/resources/tenants/api-tokens/v1';
var SECURITY_POLICY_API_V1 = '/identity/resources/configurations/v1';
/**
* Get global secure access configuration
*/
function getGlobalSecurityPolicy() {
return tslib.__awaiter(this, void 0, void 0, function () {
return tslib.__generator(this, function (_a) {
console.debug('getGlobalSecurityPolicy()');
return [2 /*return*/, Get(SECURITY_POLICY_API_V1)];
});
});
}
/**
* Get Mfa configuration from security policy
*/
function getMfaPolicy() {
return tslib.__awaiter(this, void 0, void 0, function () {
return tslib.__generator(this, function (_a) {
console.debug('getMfaPolicy()');
return [2 /*return*/, Get(SECURITY_POLICY_API_V1 + "/mfa-policy")];
});
});
}
/**
* Create/Update Mfa configuration from security policy
*/
function saveMfaPolicy(body) {
return tslib.__awaiter(this, void 0, void 0, function () {
return tslib.__generator(this, function (_a) {
console.debug('saveMfaPolicy()');
if (body.id) {
return [2 /*return*/, Patch(SECURITY_POLICY_API_V1 + "/mfa-policy", body)];
}
else {
return [2 /*return*/, Post(SECURITY_POLICY_API_V1 + "/mfa-policy", body)];
}
});
});
}
/**
* Get Lockout configuration from security policy
*/
function getLockoutPolicy() {
return tslib.__awaiter(this, void 0, void 0, function () {
return tslib.__generator(this, function (_a) {
console.debug('getLockoutPolicy()');
return [2 /*return*/, Get(SECURITY_POLICY_API_V1 + "/lockout-policy")];
});
});
}
/**
* Create/Update Lockout configuration from security policy
*/
function saveLockoutPolicy(body) {
return tslib.__awaiter(this, void 0, void 0, function () {
return tslib.__generator(this, function (_a) {
console.debug('saveLockoutPolicy()');
if (body.id) {
return [2 /*return*/, Patch(SECURITY_POLICY_API_V1 + "/lockout-policy", body)];
}
else {
return [2 /*return*/, Post(SECURITY_POLICY_API_V1 + "/lockout-policy", body)];
}
});
});
}
/*****************************************

@@ -885,3 +952,8 @@ * Authentication

deleteUserApiToken: deleteUserApiToken,
getUserById: getUserById
getUserById: getUserById,
getGlobalSecurityPolicy: getGlobalSecurityPolicy,
getMfaPolicy: getMfaPolicy,
saveMfaPolicy: saveMfaPolicy,
getLockoutPolicy: getLockoutPolicy,
saveLockoutPolicy: saveLockoutPolicy
});

@@ -888,0 +960,0 @@

{
"name": "@frontegg/rest-api",
"libName": "FronteggRestApi",
"version": "1.21.3",
"version": "1.21.4",
"author": "Frontegg LTD",

@@ -6,0 +6,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc