@microsoft/kiota-authentication-azure
Advanced tools
Comparing version 1.0.0-preview.46 to 1.0.0-preview.47
@@ -0,1 +1,7 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
import type { GetTokenOptions, TokenCredential } from "@azure/core-auth"; | ||
@@ -2,0 +8,0 @@ import { type AccessTokenProvider, AllowedHostsValidator } from "@microsoft/kiota-abstractions"; |
@@ -1,2 +0,8 @@ | ||
import { AllowedHostsValidator, validateProtocol, } from "@microsoft/kiota-abstractions"; | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
import { AllowedHostsValidator, validateProtocol, inNodeEnv } from "@microsoft/kiota-abstractions"; | ||
import { trace } from "@opentelemetry/api"; | ||
@@ -22,5 +28,3 @@ import { ObservabilityOptionsImpl } from "./observabilityOptions"; | ||
this.getAuthorizationToken = (url, additionalAuthenticationContext) => { | ||
return trace | ||
.getTracer(this.observabilityOptions.getTracerInstrumentationName()) | ||
.startActiveSpan("getAuthorizationToken", (span) => { | ||
return trace.getTracer(this.observabilityOptions.getTracerInstrumentationName()).startActiveSpan("getAuthorizationToken", (span) => { | ||
try { | ||
@@ -43,6 +47,5 @@ return this.getAuthorizationTokenInternal(url, additionalAuthenticationContext, span); | ||
let decodedClaims = ""; | ||
if (additionalAuthenticationContext && | ||
additionalAuthenticationContext[AzureIdentityAccessTokenProvider.claimsKey]) { | ||
if (additionalAuthenticationContext && additionalAuthenticationContext[AzureIdentityAccessTokenProvider.claimsKey]) { | ||
const rawClaims = additionalAuthenticationContext[AzureIdentityAccessTokenProvider.claimsKey]; | ||
decodedClaims = Buffer.from(rawClaims, "base64").toString(); | ||
decodedClaims = inNodeEnv() ? Buffer.from(rawClaims, "base64").toString() : atob(rawClaims); | ||
} | ||
@@ -81,3 +84,3 @@ span === null || span === void 0 ? void 0 : span.setAttribute("com.microsoft.kiota.authentication.additional_claims_provided", decodedClaims !== ""); | ||
this.getSchemeFromLocation = () => { | ||
if (window && window.location && window.location.protocol) { | ||
if (!inNodeEnv()) { | ||
return window.location.protocol.replace(":", ""); | ||
@@ -88,3 +91,3 @@ } | ||
this.getHostFromLocation = () => { | ||
if (window && window.location && window.location.host) { | ||
if (!inNodeEnv()) { | ||
return window.location.host; | ||
@@ -111,1 +114,2 @@ } | ||
AzureIdentityAccessTokenProvider.claimsKey = "claims"; | ||
//# sourceMappingURL=azureIdentityAccessTokenProvider.js.map |
@@ -0,1 +1,7 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
import type { GetTokenOptions, TokenCredential } from "@azure/core-auth"; | ||
@@ -2,0 +8,0 @@ import { BaseBearerTokenAuthenticationProvider } from "@microsoft/kiota-abstractions"; |
@@ -0,1 +1,7 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
import { BaseBearerTokenAuthenticationProvider } from "@microsoft/kiota-abstractions"; | ||
@@ -12,12 +18,6 @@ import { AzureIdentityAccessTokenProvider } from "./azureIdentityAccessTokenProvider"; | ||
*/ | ||
constructor(credentials, scopes = ["https://graph.microsoft.com/.default"], options, allowedHosts = new Set([ | ||
"graph.microsoft.com", | ||
"graph.microsoft.us", | ||
"dod-graph.microsoft.us", | ||
"graph.microsoft.de", | ||
"microsoftgraph.chinacloudapi.cn", | ||
"canary.graph.microsoft.com", | ||
]), observabilityOptions = new ObservabilityOptionsImpl()) { | ||
constructor(credentials, scopes = ["https://graph.microsoft.com/.default"], options, allowedHosts = new Set(["graph.microsoft.com", "graph.microsoft.us", "dod-graph.microsoft.us", "graph.microsoft.de", "microsoftgraph.chinacloudapi.cn", "canary.graph.microsoft.com"]), observabilityOptions = new ObservabilityOptionsImpl()) { | ||
super(new AzureIdentityAccessTokenProvider(credentials, scopes, options, allowedHosts, observabilityOptions)); | ||
} | ||
} | ||
//# sourceMappingURL=azureIdentityAuthenticationProvider.js.map |
@@ -0,3 +1,9 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
export * from "./azureIdentityAuthenticationProvider"; | ||
export * from "./azureIdentityAccessTokenProvider"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -0,2 +1,9 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
export * from "./azureIdentityAuthenticationProvider"; | ||
export * from "./azureIdentityAccessTokenProvider"; | ||
//# sourceMappingURL=index.js.map |
@@ -0,1 +1,7 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
export interface ObservabilityOptions { | ||
@@ -2,0 +8,0 @@ getTracerInstrumentationName(): string; |
@@ -0,1 +1,7 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
export class ObservabilityOptionsImpl { | ||
@@ -6,1 +12,2 @@ getTracerInstrumentationName() { | ||
} | ||
//# sourceMappingURL=observabilityOptions.js.map |
{ | ||
"name": "@microsoft/kiota-authentication-azure", | ||
"version": "1.0.0-preview.46", | ||
"description": "Authentication provider for Kiota using Azure Identity", | ||
"main": "dist/cjs/src/index.js", | ||
"module": "dist/es/src/index.js", | ||
"types": "dist/cjs/src/index.d.ts", | ||
"scripts": { | ||
"build": "npm run build:cjs && npm run build:esm", | ||
"build:cjs": "tsc -b tsconfig.cjs.json", | ||
"build:esm": "tsc -b tsconfig.es.json", | ||
"test": "npm run build && mocha 'dist/cjs/test/**/*.js'", | ||
"lint": "eslint . --ext .ts", | ||
"lint:fix": "eslint . --ext .ts --fix", | ||
"clean": "rm -r ./dist" | ||
}, | ||
"repository": "git://github.com/microsoft/kiota-typescript.git", | ||
"keywords": [ | ||
"Kiota", | ||
"OpenApi", | ||
"Azure", | ||
"Authentication", | ||
"OAuth" | ||
], | ||
"author": "Microsoft", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/microsoft/kiota-typescript/issues" | ||
}, | ||
"homepage": "https://github.com/microsoft/kiota-typescript#readme", | ||
"dependencies": { | ||
"@azure/core-auth": "^1.5.0", | ||
"@microsoft/kiota-abstractions": "^1.0.0-preview.51", | ||
"@opentelemetry/api": "^1.7.0", | ||
"tslib": "^2.6.2" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"gitHead": "8b6e35c21fdd163b9412bbb7e7fcdf11d475eaab" | ||
"name": "@microsoft/kiota-authentication-azure", | ||
"version": "1.0.0-preview.47", | ||
"description": "Authentication provider for Kiota using Azure Identity", | ||
"main": "dist/es/src/index.js", | ||
"module": "dist/es/src/index.js", | ||
"types": "dist/es/src/index.d.ts", | ||
"scripts": { | ||
"build": "npm run build:esm", | ||
"build:esm": "tsc", | ||
"test:node": "vitest run", | ||
"test:browser": "vitest run --browser.name=chrome --browser.headless", | ||
"test": "npm run test:node && npm run test:browser", | ||
"lint": "eslint . --ext .ts", | ||
"lint:fix": "eslint . --ext .ts --fix", | ||
"clean": "rm -rf ./dist" | ||
}, | ||
"repository": "git://github.com/microsoft/kiota-typescript.git", | ||
"keywords": [ | ||
"Kiota", | ||
"OpenApi", | ||
"Azure", | ||
"Authentication", | ||
"OAuth" | ||
], | ||
"author": "Microsoft", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/microsoft/kiota-typescript/issues" | ||
}, | ||
"homepage": "https://github.com/microsoft/kiota-typescript#readme", | ||
"dependencies": { | ||
"@azure/core-auth": "^1.5.0", | ||
"@microsoft/kiota-abstractions": "*", | ||
"@opentelemetry/api": "^1.7.0", | ||
"tslib": "^2.6.2" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"gitHead": "395b1b29ee2dcdd4a0f03a5222c506b02f449164" | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
78770
22
235
1
1
- Removed@microsoft/kiota-abstractions@1.0.0-preview.74(transitive)
- Removed@std-uritemplate/std-uritemplate@1.0.6(transitive)
- Removedtinyduration@3.3.1(transitive)
- Removeduuid@11.0.3(transitive)