86 lines
2.0 KiB
JavaScript
86 lines
2.0 KiB
JavaScript
|
/*! @azure/msal-node v2.5.1 2023-11-07 */
|
||
|
'use strict';
|
||
|
/*
|
||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||
|
* Licensed under the MIT License.
|
||
|
*/
|
||
|
/**
|
||
|
* http methods
|
||
|
*/
|
||
|
const HttpMethod = {
|
||
|
GET: "get",
|
||
|
POST: "post",
|
||
|
};
|
||
|
const ProxyStatus = {
|
||
|
SUCCESS_RANGE_START: 200,
|
||
|
SUCCESS_RANGE_END: 299,
|
||
|
SERVER_ERROR: 500,
|
||
|
};
|
||
|
/**
|
||
|
* Constants used for region discovery
|
||
|
*/
|
||
|
const REGION_ENVIRONMENT_VARIABLE = "REGION_NAME";
|
||
|
/**
|
||
|
* Constant used for PKCE
|
||
|
*/
|
||
|
const RANDOM_OCTET_SIZE = 32;
|
||
|
/**
|
||
|
* Constants used in PKCE
|
||
|
*/
|
||
|
const Hash = {
|
||
|
SHA256: "sha256",
|
||
|
};
|
||
|
/**
|
||
|
* Constants for encoding schemes
|
||
|
*/
|
||
|
const CharSet = {
|
||
|
CV_CHARSET: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",
|
||
|
};
|
||
|
/**
|
||
|
* Constants
|
||
|
*/
|
||
|
const Constants = {
|
||
|
MSAL_SKU: "msal.js.node",
|
||
|
JWT_BEARER_ASSERTION_TYPE: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
|
||
|
AUTHORIZATION_PENDING: "authorization_pending",
|
||
|
HTTP_PROTOCOL: "http://",
|
||
|
LOCALHOST: "localhost",
|
||
|
};
|
||
|
/**
|
||
|
* API Codes for Telemetry purposes.
|
||
|
* Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs
|
||
|
* 0-99 Silent Flow
|
||
|
* 600-699 Device Code Flow
|
||
|
* 800-899 Auth Code Flow
|
||
|
*/
|
||
|
const ApiId = {
|
||
|
acquireTokenSilent: 62,
|
||
|
acquireTokenByUsernamePassword: 371,
|
||
|
acquireTokenByDeviceCode: 671,
|
||
|
acquireTokenByClientCredential: 771,
|
||
|
acquireTokenByCode: 871,
|
||
|
acquireTokenByRefreshToken: 872,
|
||
|
};
|
||
|
/**
|
||
|
* JWT constants
|
||
|
*/
|
||
|
const JwtConstants = {
|
||
|
ALGORITHM: "alg",
|
||
|
RSA_256: "RS256",
|
||
|
X5T: "x5t",
|
||
|
X5C: "x5c",
|
||
|
AUDIENCE: "aud",
|
||
|
EXPIRATION_TIME: "exp",
|
||
|
ISSUER: "iss",
|
||
|
SUBJECT: "sub",
|
||
|
NOT_BEFORE: "nbf",
|
||
|
JWT_ID: "jti",
|
||
|
};
|
||
|
const LOOPBACK_SERVER_CONSTANTS = {
|
||
|
INTERVAL_MS: 100,
|
||
|
TIMEOUT_MS: 5000,
|
||
|
};
|
||
|
|
||
|
export { ApiId, CharSet, Constants, Hash, HttpMethod, JwtConstants, LOOPBACK_SERVER_CONSTANTS, ProxyStatus, RANDOM_OCTET_SIZE, REGION_ENVIRONMENT_VARIABLE };
|
||
|
//# sourceMappingURL=Constants.mjs.map
|