@azure/communication-common
Advanced tools
Comparing version 2.3.0 to 2.3.1-alpha.20231110.1
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
import jwtDecode from "jwt-decode"; | ||
import { jwtDecode } from "jwt-decode"; | ||
export const parseToken = (token) => { | ||
@@ -5,0 +5,0 @@ const { exp } = jwtDecode(token); |
@@ -11,9 +11,6 @@ 'use strict'; | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var jwtDecode__default = /*#__PURE__*/_interopDefaultLegacy(jwtDecode); | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
const parseToken = (token) => { | ||
const { exp } = jwtDecode__default["default"](token); | ||
const { exp } = jwtDecode.jwtDecode(token); | ||
return { | ||
@@ -26,2 +23,3 @@ token, | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
const expiredToken = { token: "", expiresOnTimestamp: -10 }; | ||
@@ -143,2 +141,3 @@ const minutesToMs = (minutes) => minutes * 1000 * 60; | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
/** | ||
@@ -182,2 +181,3 @@ * The CommunicationTokenCredential implementation with support for proactive token refresh. | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
const shaHash = async (content) => crypto.createHash("sha256").update(content).digest("base64"); | ||
@@ -190,2 +190,3 @@ const shaHMAC = async (secret, content) => { | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
/** | ||
@@ -231,2 +232,3 @@ * CommunicationKeyCredentialPolicy provides a means of signing requests made through | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
/** | ||
@@ -253,2 +255,3 @@ * Creates a pipeline policy to authenticate request based | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
// TODO: update when connection string format is finalized | ||
@@ -281,2 +284,3 @@ const CONNECTION_STRING_REGEX = /endpoint=(.*);accesskey=(.*)/i; | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
const isValidEndpoint = (host) => { | ||
@@ -488,2 +492,3 @@ var _a; | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
const assertNotNullOrUndefined = (obj, prop) => { | ||
@@ -490,0 +495,0 @@ const subObjName = Object.keys(obj)[0]; |
{ | ||
"name": "@azure/communication-common", | ||
"version": "2.3.0", | ||
"version": "2.3.1-alpha.20231110.1", | ||
"description": "Common package for Azure Communication services.", | ||
@@ -59,3 +59,3 @@ "sdk-type": "client", | ||
"engines": { | ||
"node": ">=14.0.0" | ||
"node": ">=18.0.0" | ||
}, | ||
@@ -72,8 +72,8 @@ "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/communication/communication-common/", | ||
"events": "^3.0.0", | ||
"jwt-decode": "^3.1.2", | ||
"jwt-decode": "^4.0.0", | ||
"tslib": "^2.2.0" | ||
}, | ||
"devDependencies": { | ||
"@azure/eslint-plugin-azure-sdk": "^3.0.0", | ||
"@azure/dev-tool": "^1.0.0", | ||
"@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb", | ||
"@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb", | ||
"@microsoft/api-extractor": "^7.31.1", | ||
@@ -83,3 +83,3 @@ "@types/chai-as-promised": "^7.1.0", | ||
"@types/mocha": "^10.0.0", | ||
"@types/node": "^14.0.0", | ||
"@types/node": "^18.0.0", | ||
"@types/sinon": "^10.0.0", | ||
@@ -102,7 +102,7 @@ "chai-as-promised": "^7.1.1", | ||
"mocha": "^10.0.0", | ||
"nyc": "^15.0.0", | ||
"c8": "^8.0.0", | ||
"prettier": "^2.5.1", | ||
"rimraf": "^3.0.0", | ||
"sinon": "^15.0.0", | ||
"typescript": "~5.0.0", | ||
"sinon": "^17.0.0", | ||
"typescript": "~5.2.0", | ||
"util": "^0.12.1", | ||
@@ -109,0 +109,0 @@ "mockdate": "^3.0.5", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
185348
1690
1
+ Addedjwt-decode@4.0.0(transitive)
- Removedjwt-decode@3.1.2(transitive)
Updatedjwt-decode@^4.0.0