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

@azure/core-auth

Package Overview
Dependencies
Maintainers
2
Versions
296
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/core-auth - npm Package Compare versions

Comparing version 1.8.1-alpha.20241016.3 to 1.9.0-alpha.20241021.2

1

dist/browser/index.d.ts

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

export { HttpMethods } from "@azure/core-util";
export { AzureKeyCredential } from "./azureKeyCredential.js";

@@ -2,0 +3,0 @@ export { KeyCredential, isKeyCredential } from "./keyCredential.js";

2

dist/browser/index.js

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

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
export { AzureKeyCredential } from "./azureKeyCredential.js";

@@ -4,0 +2,0 @@ export { isKeyCredential } from "./keyCredential.js";

import { AbortSignalLike } from "@azure/abort-controller";
import { TracingContext } from "./tracing.js";
import { HttpMethods } from "@azure/core-util";
/**

@@ -57,2 +58,23 @@ * Represents a credential capable of providing an authentication token.

tenantId?: string;
/**
* Options for Proof of Possession token requests
*/
proofOfPossessionOptions?: {
/**
* The nonce value required for PoP token requests.
* This is typically retrieved from the WWW-Authenticate header of a 401 challenge response.
* This is used in combination with {@link resourceRequestUrl} and {@link resourceRequestMethod} to generate the PoP token.
*/
nonce: string;
/**
* The HTTP method of the request.
* This is used in combination with {@link resourceRequestUrl} and {@link nonce} to generate the PoP token.
*/
resourceRequestMethod: HttpMethods;
/**
* The URL of the request.
* This is used in combination with {@link resourceRequestMethod} and {@link nonce} to generate the PoP token.
*/
resourceRequestUrl: string;
};
}

@@ -75,4 +97,18 @@ /**

refreshAfterTimestamp?: number;
/** Type of token - `Bearer` or `pop` */
tokenType?: "Bearer" | "pop";
}
/**
* @internal
* @param accessToken - Access token
* @returns Whether a token is bearer type or not
*/
export declare function isBearerToken(accessToken: AccessToken): boolean;
/**
* @internal
* @param accessToken - Access token
* @returns Whether a token is Pop token or not
*/
export declare function isPopToken(accessToken: AccessToken): boolean;
/**
* Tests an object to determine whether it implements TokenCredential.

@@ -79,0 +115,0 @@ *

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* @internal
* @param accessToken - Access token
* @returns Whether a token is bearer type or not
*/
export function isBearerToken(accessToken) {
return !accessToken.tokenType || accessToken.tokenType === "Bearer";
}
/**
* @internal
* @param accessToken - Access token
* @returns Whether a token is Pop token or not
*/
export function isPopToken(accessToken) {
return accessToken.tokenType === "pop";
}
/**
* Tests an object to determine whether it implements TokenCredential.

@@ -5,0 +21,0 @@ *

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

export { HttpMethods } from "@azure/core-util";
export { AzureKeyCredential } from "./azureKeyCredential.js";

@@ -2,0 +3,0 @@ export { KeyCredential, isKeyCredential } from "./keyCredential.js";

"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
Object.defineProperty(exports, "__esModule", { value: true });

@@ -5,0 +3,0 @@ exports.isTokenCredential = exports.isSASCredential = exports.AzureSASCredential = exports.isNamedKeyCredential = exports.AzureNamedKeyCredential = exports.isKeyCredential = exports.AzureKeyCredential = void 0;

import { AbortSignalLike } from "@azure/abort-controller";
import { TracingContext } from "./tracing.js";
import { HttpMethods } from "@azure/core-util";
/**

@@ -57,2 +58,23 @@ * Represents a credential capable of providing an authentication token.

tenantId?: string;
/**
* Options for Proof of Possession token requests
*/
proofOfPossessionOptions?: {
/**
* The nonce value required for PoP token requests.
* This is typically retrieved from the WWW-Authenticate header of a 401 challenge response.
* This is used in combination with {@link resourceRequestUrl} and {@link resourceRequestMethod} to generate the PoP token.
*/
nonce: string;
/**
* The HTTP method of the request.
* This is used in combination with {@link resourceRequestUrl} and {@link nonce} to generate the PoP token.
*/
resourceRequestMethod: HttpMethods;
/**
* The URL of the request.
* This is used in combination with {@link resourceRequestMethod} and {@link nonce} to generate the PoP token.
*/
resourceRequestUrl: string;
};
}

@@ -75,4 +97,18 @@ /**

refreshAfterTimestamp?: number;
/** Type of token - `Bearer` or `pop` */
tokenType?: "Bearer" | "pop";
}
/**
* @internal
* @param accessToken - Access token
* @returns Whether a token is bearer type or not
*/
export declare function isBearerToken(accessToken: AccessToken): boolean;
/**
* @internal
* @param accessToken - Access token
* @returns Whether a token is Pop token or not
*/
export declare function isPopToken(accessToken: AccessToken): boolean;
/**
* Tests an object to determine whether it implements TokenCredential.

@@ -79,0 +115,0 @@ *

@@ -5,4 +5,22 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.isBearerToken = isBearerToken;
exports.isPopToken = isPopToken;
exports.isTokenCredential = isTokenCredential;
/**
* @internal
* @param accessToken - Access token
* @returns Whether a token is bearer type or not
*/
function isBearerToken(accessToken) {
return !accessToken.tokenType || accessToken.tokenType === "Bearer";
}
/**
* @internal
* @param accessToken - Access token
* @returns Whether a token is Pop token or not
*/
function isPopToken(accessToken) {
return accessToken.tokenType === "pop";
}
/**
* Tests an object to determine whether it implements TokenCredential.

@@ -9,0 +27,0 @@ *

@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.

"packageName": "@microsoft/api-extractor",
"packageVersion": "7.47.9"
"packageVersion": "7.47.11"
}
]
}
import { AbortSignalLike } from '@azure/abort-controller';
import { HttpMethods } from '@azure/core-util';

@@ -19,2 +20,4 @@ /**

refreshAfterTimestamp?: number;
/** Type of token - `Bearer` or `pop` */
tokenType?: "Bearer" | "pop";
}

@@ -151,4 +154,27 @@

tenantId?: string;
/**
* Options for Proof of Possession token requests
*/
proofOfPossessionOptions?: {
/**
* The nonce value required for PoP token requests.
* This is typically retrieved from the WWW-Authenticate header of a 401 challenge response.
* This is used in combination with {@link resourceRequestUrl} and {@link resourceRequestMethod} to generate the PoP token.
*/
nonce: string;
/**
* The HTTP method of the request.
* This is used in combination with {@link resourceRequestUrl} and {@link nonce} to generate the PoP token.
*/
resourceRequestMethod: HttpMethods;
/**
* The URL of the request.
* This is used in combination with {@link resourceRequestMethod} and {@link nonce} to generate the PoP token.
*/
resourceRequestUrl: string;
};
}
export { HttpMethods }
/**

@@ -155,0 +181,0 @@ * Tests an object to determine whether it implements KeyCredential.

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

export { HttpMethods } from "@azure/core-util";
export { AzureKeyCredential } from "./azureKeyCredential.js";

@@ -2,0 +3,0 @@ export { KeyCredential, isKeyCredential } from "./keyCredential.js";

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

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
export { AzureKeyCredential } from "./azureKeyCredential.js";

@@ -4,0 +2,0 @@ export { isKeyCredential } from "./keyCredential.js";

import { AbortSignalLike } from "@azure/abort-controller";
import { TracingContext } from "./tracing.js";
import { HttpMethods } from "@azure/core-util";
/**

@@ -57,2 +58,23 @@ * Represents a credential capable of providing an authentication token.

tenantId?: string;
/**
* Options for Proof of Possession token requests
*/
proofOfPossessionOptions?: {
/**
* The nonce value required for PoP token requests.
* This is typically retrieved from the WWW-Authenticate header of a 401 challenge response.
* This is used in combination with {@link resourceRequestUrl} and {@link resourceRequestMethod} to generate the PoP token.
*/
nonce: string;
/**
* The HTTP method of the request.
* This is used in combination with {@link resourceRequestUrl} and {@link nonce} to generate the PoP token.
*/
resourceRequestMethod: HttpMethods;
/**
* The URL of the request.
* This is used in combination with {@link resourceRequestMethod} and {@link nonce} to generate the PoP token.
*/
resourceRequestUrl: string;
};
}

@@ -75,4 +97,18 @@ /**

refreshAfterTimestamp?: number;
/** Type of token - `Bearer` or `pop` */
tokenType?: "Bearer" | "pop";
}
/**
* @internal
* @param accessToken - Access token
* @returns Whether a token is bearer type or not
*/
export declare function isBearerToken(accessToken: AccessToken): boolean;
/**
* @internal
* @param accessToken - Access token
* @returns Whether a token is Pop token or not
*/
export declare function isPopToken(accessToken: AccessToken): boolean;
/**
* Tests an object to determine whether it implements TokenCredential.

@@ -79,0 +115,0 @@ *

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* @internal
* @param accessToken - Access token
* @returns Whether a token is bearer type or not
*/
export function isBearerToken(accessToken) {
return !accessToken.tokenType || accessToken.tokenType === "Bearer";
}
/**
* @internal
* @param accessToken - Access token
* @returns Whether a token is Pop token or not
*/
export function isPopToken(accessToken) {
return accessToken.tokenType === "pop";
}
/**
* Tests an object to determine whether it implements TokenCredential.

@@ -5,0 +21,0 @@ *

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

export { HttpMethods } from "@azure/core-util";
export { AzureKeyCredential } from "./azureKeyCredential.js";

@@ -2,0 +3,0 @@ export { KeyCredential, isKeyCredential } from "./keyCredential.js";

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

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
export { AzureKeyCredential } from "./azureKeyCredential.js";

@@ -4,0 +2,0 @@ export { isKeyCredential } from "./keyCredential.js";

import { AbortSignalLike } from "@azure/abort-controller";
import { TracingContext } from "./tracing.js";
import { HttpMethods } from "@azure/core-util";
/**

@@ -57,2 +58,23 @@ * Represents a credential capable of providing an authentication token.

tenantId?: string;
/**
* Options for Proof of Possession token requests
*/
proofOfPossessionOptions?: {
/**
* The nonce value required for PoP token requests.
* This is typically retrieved from the WWW-Authenticate header of a 401 challenge response.
* This is used in combination with {@link resourceRequestUrl} and {@link resourceRequestMethod} to generate the PoP token.
*/
nonce: string;
/**
* The HTTP method of the request.
* This is used in combination with {@link resourceRequestUrl} and {@link nonce} to generate the PoP token.
*/
resourceRequestMethod: HttpMethods;
/**
* The URL of the request.
* This is used in combination with {@link resourceRequestMethod} and {@link nonce} to generate the PoP token.
*/
resourceRequestUrl: string;
};
}

@@ -75,4 +97,18 @@ /**

refreshAfterTimestamp?: number;
/** Type of token - `Bearer` or `pop` */
tokenType?: "Bearer" | "pop";
}
/**
* @internal
* @param accessToken - Access token
* @returns Whether a token is bearer type or not
*/
export declare function isBearerToken(accessToken: AccessToken): boolean;
/**
* @internal
* @param accessToken - Access token
* @returns Whether a token is Pop token or not
*/
export declare function isPopToken(accessToken: AccessToken): boolean;
/**
* Tests an object to determine whether it implements TokenCredential.

@@ -79,0 +115,0 @@ *

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* @internal
* @param accessToken - Access token
* @returns Whether a token is bearer type or not
*/
export function isBearerToken(accessToken) {
return !accessToken.tokenType || accessToken.tokenType === "Bearer";
}
/**
* @internal
* @param accessToken - Access token
* @returns Whether a token is Pop token or not
*/
export function isPopToken(accessToken) {
return accessToken.tokenType === "pop";
}
/**
* Tests an object to determine whether it implements TokenCredential.

@@ -5,0 +21,0 @@ *

{
"name": "@azure/core-auth",
"version": "1.8.1-alpha.20241016.3",
"version": "1.9.0-alpha.20241021.2",
"description": "Provides low-level interfaces and helper methods for authentication in Azure SDK",

@@ -78,3 +78,3 @@ "sdk-type": "client",

"@azure/abort-controller": "^2.0.0",
"@azure/core-util": "^1.1.0",
"@azure/core-util": ">=1.11.0-alpha <1.11.0-alphb",
"tslib": "^2.6.2"

@@ -81,0 +81,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 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 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

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