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

auth0

Package Overview
Dependencies
Maintainers
47
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auth0 - npm Package Compare versions

Comparing version 4.3.1 to 4.4.0

2

dist/cjs/auth/base-auth-api.d.ts

@@ -13,2 +13,3 @@ import { BaseAPI, ClientOptions, InitOverrideFunction, JSONApiResponse, RequestOpts } from '../lib/runtime.js';

clockTolerance?: number;
useMTLS?: boolean;
}

@@ -30,2 +31,3 @@ export declare class AuthApiError extends Error {

clientAssertionSigningAlg?: string;
useMTLS?: boolean;
constructor(options: AuthenticationClientOptions);

@@ -32,0 +34,0 @@ /**

@@ -63,2 +63,3 @@ "use strict";

this.clientAssertionSigningAlg = options.clientAssertionSigningAlg;
this.useMTLS = options.useMTLS;
}

@@ -76,2 +77,3 @@ /**

clientAssertionSigningAlg: this.clientAssertionSigningAlg,
useMTLS: this.useMTLS,
});

@@ -78,0 +80,0 @@ }

3

dist/cjs/auth/client-authentication.d.ts

@@ -16,2 +16,3 @@ export interface AddClientAuthenticationPayload {

clientSecret?: string;
useMTLS?: boolean;
}

@@ -26,3 +27,3 @@ /**

*/
export declare const addClientAuthentication: ({ payload, domain, clientId, clientAssertionSigningKey, clientAssertionSigningAlg, clientSecret, }: AddClientAuthenticationOptions) => Promise<Record<string, unknown>>;
export declare const addClientAuthentication: ({ payload, domain, clientId, clientAssertionSigningKey, clientAssertionSigningAlg, clientSecret, useMTLS, }: AddClientAuthenticationOptions) => Promise<Record<string, unknown>>;
export {};

@@ -37,3 +37,3 @@ "use strict";

*/
const addClientAuthentication = async ({ payload, domain, clientId, clientAssertionSigningKey, clientAssertionSigningAlg, clientSecret, }) => {
const addClientAuthentication = async ({ payload, domain, clientId, clientAssertionSigningKey, clientAssertionSigningAlg, clientSecret, useMTLS, }) => {
const cid = payload.client_id || clientId;

@@ -58,4 +58,5 @@ if (clientAssertionSigningKey && !payload.client_assertion) {

if ((!payload.client_secret || payload.client_secret.trim().length === 0) &&
(!payload.client_assertion || payload.client_assertion.trim().length === 0)) {
throw new Error('The client_secret or client_assertion field is required.');
(!payload.client_assertion || payload.client_assertion.trim().length === 0) &&
!useMTLS) {
throw new Error('The client_secret or client_assertion field is required, or it should be mTLS request.');
}

@@ -62,0 +63,0 @@ return payload;

@@ -126,2 +126,10 @@ import { InitOverride, JSONApiResponse, VoidApiResponse } from '../lib/runtime.js';

/**
* Allows JWT-Secured Authorization Request (JAR), when JAR & PAR request are used together. {@link https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow/authorization-code-flow-with-par-and-jar | Reference}
*/
request?: string;
/**
* A JSON stringified array of objects. It can carry fine-grained authorization data in OAuth messages as part of Rich Authorization Requests (RAR) {@link https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow/authorization-code-flow-with-rar | Reference}
*/
authorization_details?: string;
/**
* Allow for any custom property to be sent to Auth0

@@ -128,0 +136,0 @@ */

@@ -7,2 +7,3 @@ "use strict";

const id_token_validator_js_1 = require("./id-token-validator.js");
const utils_js_1 = require("../utils.js");
/**

@@ -13,3 +14,6 @@ * OAuth 2.0 flows.

constructor(options) {
super(options);
super({
...options,
domain: options.useMTLS ? `${utils_js_1.mtlsPrefix}.${options.domain}` : options.domain,
});
this.idTokenValidator = new id_token_validator_js_1.IDTokenValidator(options);

@@ -16,0 +20,0 @@ }

import { RetryConfiguration } from './retry.js';
import { Dispatcher } from 'undici';
/**

@@ -27,3 +28,3 @@ * @private

*/
agent?: unknown;
agent?: Dispatcher;
/**

@@ -30,0 +31,0 @@ * Custom headers that will be added to every request.

@@ -137,3 +137,3 @@ "use strict";

body: context.body,
agent: this.configuration.agent,
dispatcher: this.configuration.agent,
};

@@ -140,0 +140,0 @@ const overriddenInit = {

@@ -1076,2 +1076,4 @@ "use strict";

token_authz: 'access_token_authz',
rfc9068_profile: 'rfc9068_profile',
rfc9068_profile_authz: 'rfc9068_profile_authz',
};

@@ -1086,2 +1088,4 @@ exports.ResourceServerCreateSigningAlgEnum = {

token_authz: 'access_token_authz',
rfc9068_profile: 'rfc9068_profile',
rfc9068_profile_authz: 'rfc9068_profile_authz',
};

@@ -1096,2 +1100,4 @@ exports.ResourceServerUpdateSigningAlgEnum = {

token_authz: 'access_token_authz',
rfc9068_profile: 'rfc9068_profile',
rfc9068_profile_authz: 'rfc9068_profile_authz',
};

@@ -1098,0 +1104,0 @@ exports.TenantSettingsEnabledLocalesEnum = {

@@ -12,2 +12,3 @@ import { ClientOptions } from '../lib/runtime.js';

clientSecret: string;
useMTLS?: boolean;
}

@@ -18,3 +19,4 @@ export interface ManagementClientOptionsWithClientAssertion extends ManagementClientOptions {

clientAssertionSigningAlg?: string;
useMTLS?: boolean;
}
export type ManagementClientOptionsWithClientCredentials = ManagementClientOptionsWithClientSecret | ManagementClientOptionsWithClientAssertion;

@@ -11,1 +11,5 @@ /**

};
/**
* @private
*/
export declare const mtlsPrefix = "mtls";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateClientInfo = void 0;
exports.mtlsPrefix = exports.generateClientInfo = void 0;
const version_js_1 = require("./version.js");

@@ -16,2 +16,6 @@ /**

exports.generateClientInfo = generateClientInfo;
/**
* @private
*/
exports.mtlsPrefix = 'mtls';
//# sourceMappingURL=utils.js.map

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

export declare const version = "4.3.1";
export declare const version = "4.4.0";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = '4.3.1';
exports.version = '4.4.0';
//# sourceMappingURL=version.js.map

@@ -13,2 +13,3 @@ import { BaseAPI, ClientOptions, InitOverrideFunction, JSONApiResponse, RequestOpts } from '../lib/runtime.js';

clockTolerance?: number;
useMTLS?: boolean;
}

@@ -30,2 +31,3 @@ export declare class AuthApiError extends Error {

clientAssertionSigningAlg?: string;
useMTLS?: boolean;
constructor(options: AuthenticationClientOptions);

@@ -32,0 +34,0 @@ /**

@@ -59,2 +59,3 @@ import { ResponseError } from '../lib/errors.js';

this.clientAssertionSigningAlg = options.clientAssertionSigningAlg;
this.useMTLS = options.useMTLS;
}

@@ -72,2 +73,3 @@ /**

clientAssertionSigningAlg: this.clientAssertionSigningAlg,
useMTLS: this.useMTLS,
});

@@ -74,0 +76,0 @@ }

@@ -16,2 +16,3 @@ export interface AddClientAuthenticationPayload {

clientSecret?: string;
useMTLS?: boolean;
}

@@ -26,3 +27,3 @@ /**

*/
export declare const addClientAuthentication: ({ payload, domain, clientId, clientAssertionSigningKey, clientAssertionSigningAlg, clientSecret, }: AddClientAuthenticationOptions) => Promise<Record<string, unknown>>;
export declare const addClientAuthentication: ({ payload, domain, clientId, clientAssertionSigningKey, clientAssertionSigningAlg, clientSecret, useMTLS, }: AddClientAuthenticationOptions) => Promise<Record<string, unknown>>;
export {};

@@ -11,3 +11,3 @@ import * as jose from 'jose';

*/
export const addClientAuthentication = async ({ payload, domain, clientId, clientAssertionSigningKey, clientAssertionSigningAlg, clientSecret, }) => {
export const addClientAuthentication = async ({ payload, domain, clientId, clientAssertionSigningKey, clientAssertionSigningAlg, clientSecret, useMTLS, }) => {
const cid = payload.client_id || clientId;

@@ -32,4 +32,5 @@ if (clientAssertionSigningKey && !payload.client_assertion) {

if ((!payload.client_secret || payload.client_secret.trim().length === 0) &&
(!payload.client_assertion || payload.client_assertion.trim().length === 0)) {
throw new Error('The client_secret or client_assertion field is required.');
(!payload.client_assertion || payload.client_assertion.trim().length === 0) &&
!useMTLS) {
throw new Error('The client_secret or client_assertion field is required, or it should be mTLS request.');
}

@@ -36,0 +37,0 @@ return payload;

@@ -126,2 +126,10 @@ import { InitOverride, JSONApiResponse, VoidApiResponse } from '../lib/runtime.js';

/**
* Allows JWT-Secured Authorization Request (JAR), when JAR & PAR request are used together. {@link https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow/authorization-code-flow-with-par-and-jar | Reference}
*/
request?: string;
/**
* A JSON stringified array of objects. It can carry fine-grained authorization data in OAuth messages as part of Rich Authorization Requests (RAR) {@link https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow/authorization-code-flow-with-rar | Reference}
*/
authorization_details?: string;
/**
* Allow for any custom property to be sent to Auth0

@@ -128,0 +136,0 @@ */

import { JSONApiResponse, VoidApiResponse, validateRequiredRequestParams, } from '../lib/runtime.js';
import { BaseAuthAPI, grant } from './base-auth-api.js';
import { IDTokenValidator } from './id-token-validator.js';
import { mtlsPrefix } from '../utils.js';
/**

@@ -9,3 +10,6 @@ * OAuth 2.0 flows.

constructor(options) {
super(options);
super({
...options,
domain: options.useMTLS ? `${mtlsPrefix}.${options.domain}` : options.domain,
});
this.idTokenValidator = new IDTokenValidator(options);

@@ -12,0 +16,0 @@ }

import { RetryConfiguration } from './retry.js';
import { Dispatcher } from 'undici';
/**

@@ -27,3 +28,3 @@ * @private

*/
agent?: unknown;
agent?: Dispatcher;
/**

@@ -30,0 +31,0 @@ * Custom headers that will be added to every request.

@@ -120,3 +120,3 @@ import { retry } from './retry.js';

body: context.body,
agent: this.configuration.agent,
dispatcher: this.configuration.agent,
};

@@ -123,0 +123,0 @@ const overriddenInit = {

@@ -1070,2 +1070,4 @@ export const ClientTokenEndpointAuthMethodEnum = {

token_authz: 'access_token_authz',
rfc9068_profile: 'rfc9068_profile',
rfc9068_profile_authz: 'rfc9068_profile_authz',
};

@@ -1080,2 +1082,4 @@ export const ResourceServerCreateSigningAlgEnum = {

token_authz: 'access_token_authz',
rfc9068_profile: 'rfc9068_profile',
rfc9068_profile_authz: 'rfc9068_profile_authz',
};

@@ -1090,2 +1094,4 @@ export const ResourceServerUpdateSigningAlgEnum = {

token_authz: 'access_token_authz',
rfc9068_profile: 'rfc9068_profile',
rfc9068_profile_authz: 'rfc9068_profile_authz',
};

@@ -1092,0 +1098,0 @@ export const TenantSettingsEnabledLocalesEnum = {

@@ -12,2 +12,3 @@ import { ClientOptions } from '../lib/runtime.js';

clientSecret: string;
useMTLS?: boolean;
}

@@ -18,3 +19,4 @@ export interface ManagementClientOptionsWithClientAssertion extends ManagementClientOptions {

clientAssertionSigningAlg?: string;
useMTLS?: boolean;
}
export type ManagementClientOptionsWithClientCredentials = ManagementClientOptionsWithClientSecret | ManagementClientOptionsWithClientAssertion;

@@ -11,1 +11,5 @@ /**

};
/**
* @private
*/
export declare const mtlsPrefix = "mtls";

@@ -12,2 +12,6 @@ import { version } from './version.js';

});
/**
* @private
*/
export const mtlsPrefix = 'mtls';
//# sourceMappingURL=utils.js.map

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

export declare const version = "4.3.1";
export declare const version = "4.4.0";

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

export const version = '4.3.1';
export const version = '4.4.0';
//# sourceMappingURL=version.js.map
{
"name": "auth0",
"version": "4.3.1",
"version": "4.4.0",
"description": "SDK for Auth0 API v2",

@@ -82,4 +82,5 @@ "main": "dist/cjs/index.js",

"typedoc": "^0.24.6",
"typescript": "4.9.5"
"typescript": "4.9.5",
"undici": "^6.15.0"
}
}

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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

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

Sorry, the diff of this file is too big to display

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