@azure/core-auth 1.9.1-alpha.20241120.2 → 1.9.1-alpha.20241127.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.47.11"
8
+ "packageVersion": "7.48.0"
9
9
  }
10
10
  ]
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/core-auth",
3
- "version": "1.9.1-alpha.20241120.2",
3
+ "version": "1.9.1-alpha.20241127.2",
4
4
  "description": "Provides low-level interfaces and helper methods for authentication in Azure SDK",
5
5
  "sdk-type": "client",
6
6
  "type": "module",
@@ -1,284 +0,0 @@
1
- import type { AbortSignalLike } from '@azure/abort-controller';
2
- import { HttpMethods } from '@azure/core-util';
3
-
4
- /**
5
- * Represents an access token with an expiration time.
6
- */
7
- export declare interface AccessToken {
8
- /**
9
- * The access token returned by the authentication service.
10
- */
11
- token: string;
12
- /**
13
- * The access token's expiration timestamp in milliseconds, UNIX epoch time.
14
- */
15
- expiresOnTimestamp: number;
16
- /**
17
- * The timestamp when the access token should be refreshed, in milliseconds, UNIX epoch time.
18
- */
19
- refreshAfterTimestamp?: number;
20
- /** Type of token - `Bearer` or `pop` */
21
- tokenType?: "Bearer" | "pop";
22
- }
23
-
24
- /**
25
- * A static-key-based credential that supports updating
26
- * the underlying key value.
27
- */
28
- export declare class AzureKeyCredential implements KeyCredential {
29
- private _key;
30
- /**
31
- * The value of the key to be used in authentication
32
- */
33
- get key(): string;
34
- /**
35
- * Create an instance of an AzureKeyCredential for use
36
- * with a service client.
37
- *
38
- * @param key - The initial value of the key to use in authentication
39
- */
40
- constructor(key: string);
41
- /**
42
- * Change the value of the key.
43
- *
44
- * Updates will take effect upon the next request after
45
- * updating the key value.
46
- *
47
- * @param newKey - The new key value to be used
48
- */
49
- update(newKey: string): void;
50
- }
51
-
52
- /**
53
- * A static name/key-based credential that supports updating
54
- * the underlying name and key values.
55
- */
56
- export declare class AzureNamedKeyCredential implements NamedKeyCredential {
57
- private _key;
58
- private _name;
59
- /**
60
- * The value of the key to be used in authentication.
61
- */
62
- get key(): string;
63
- /**
64
- * The value of the name to be used in authentication.
65
- */
66
- get name(): string;
67
- /**
68
- * Create an instance of an AzureNamedKeyCredential for use
69
- * with a service client.
70
- *
71
- * @param name - The initial value of the name to use in authentication.
72
- * @param key - The initial value of the key to use in authentication.
73
- */
74
- constructor(name: string, key: string);
75
- /**
76
- * Change the value of the key.
77
- *
78
- * Updates will take effect upon the next request after
79
- * updating the key value.
80
- *
81
- * @param newName - The new name value to be used.
82
- * @param newKey - The new key value to be used.
83
- */
84
- update(newName: string, newKey: string): void;
85
- }
86
-
87
- /**
88
- * A static-signature-based credential that supports updating
89
- * the underlying signature value.
90
- */
91
- export declare class AzureSASCredential implements SASCredential {
92
- private _signature;
93
- /**
94
- * The value of the shared access signature to be used in authentication
95
- */
96
- get signature(): string;
97
- /**
98
- * Create an instance of an AzureSASCredential for use
99
- * with a service client.
100
- *
101
- * @param signature - The initial value of the shared access signature to use in authentication
102
- */
103
- constructor(signature: string);
104
- /**
105
- * Change the value of the signature.
106
- *
107
- * Updates will take effect upon the next request after
108
- * updating the signature value.
109
- *
110
- * @param newSignature - The new shared access signature value to be used
111
- */
112
- update(newSignature: string): void;
113
- }
114
-
115
- /**
116
- * Defines options for TokenCredential.getToken.
117
- */
118
- export declare interface GetTokenOptions {
119
- /**
120
- * The signal which can be used to abort requests.
121
- */
122
- abortSignal?: AbortSignalLike;
123
- /**
124
- * Options used when creating and sending HTTP requests for this operation.
125
- */
126
- requestOptions?: {
127
- /**
128
- * The number of milliseconds a request can take before automatically being terminated.
129
- */
130
- timeout?: number;
131
- };
132
- /**
133
- * Options used when tracing is enabled.
134
- */
135
- tracingOptions?: {
136
- /**
137
- * Tracing Context for the current request.
138
- */
139
- tracingContext?: TracingContext;
140
- };
141
- /**
142
- * Claim details to perform the Continuous Access Evaluation authentication flow
143
- */
144
- claims?: string;
145
- /**
146
- * Indicates whether to enable the Continuous Access Evaluation authentication flow
147
- */
148
- enableCae?: boolean;
149
- /**
150
- * Allows specifying a tenantId. Useful to handle challenges that provide tenant Id hints.
151
- */
152
- tenantId?: string;
153
- /**
154
- * Options for Proof of Possession token requests
155
- */
156
- proofOfPossessionOptions?: {
157
- /**
158
- * The nonce value required for PoP token requests.
159
- * This is typically retrieved from the WWW-Authenticate header of a 401 challenge response.
160
- * This is used in combination with {@link resourceRequestUrl} and {@link resourceRequestMethod} to generate the PoP token.
161
- */
162
- nonce: string;
163
- /**
164
- * The HTTP method of the request.
165
- * This is used in combination with {@link resourceRequestUrl} and {@link nonce} to generate the PoP token.
166
- */
167
- resourceRequestMethod: HttpMethods;
168
- /**
169
- * The URL of the request.
170
- * This is used in combination with {@link resourceRequestMethod} and {@link nonce} to generate the PoP token.
171
- */
172
- resourceRequestUrl: string;
173
- };
174
- }
175
-
176
- export { HttpMethods }
177
-
178
- /**
179
- * Tests an object to determine whether it implements KeyCredential.
180
- *
181
- * @param credential - The assumed KeyCredential to be tested.
182
- */
183
- export declare function isKeyCredential(credential: unknown): credential is KeyCredential;
184
-
185
- /**
186
- * Tests an object to determine whether it implements NamedKeyCredential.
187
- *
188
- * @param credential - The assumed NamedKeyCredential to be tested.
189
- */
190
- export declare function isNamedKeyCredential(credential: unknown): credential is NamedKeyCredential;
191
-
192
- /**
193
- * Tests an object to determine whether it implements SASCredential.
194
- *
195
- * @param credential - The assumed SASCredential to be tested.
196
- */
197
- export declare function isSASCredential(credential: unknown): credential is SASCredential;
198
-
199
- /**
200
- * Tests an object to determine whether it implements TokenCredential.
201
- *
202
- * @param credential - The assumed TokenCredential to be tested.
203
- */
204
- export declare function isTokenCredential(credential: unknown): credential is TokenCredential;
205
-
206
- /**
207
- * Represents a credential defined by a static API key.
208
- */
209
- export declare interface KeyCredential {
210
- /**
211
- * The value of the API key represented as a string
212
- */
213
- readonly key: string;
214
- }
215
-
216
- /**
217
- * Represents a credential defined by a static API name and key.
218
- */
219
- export declare interface NamedKeyCredential {
220
- /**
221
- * The value of the API key represented as a string
222
- */
223
- readonly key: string;
224
- /**
225
- * The value of the API name represented as a string.
226
- */
227
- readonly name: string;
228
- }
229
-
230
- /**
231
- * Represents a credential defined by a static shared access signature.
232
- */
233
- export declare interface SASCredential {
234
- /**
235
- * The value of the shared access signature represented as a string
236
- */
237
- readonly signature: string;
238
- }
239
-
240
- /**
241
- * Represents a credential capable of providing an authentication token.
242
- */
243
- export declare interface TokenCredential {
244
- /**
245
- * Gets the token provided by this credential.
246
- *
247
- * This method is called automatically by Azure SDK client libraries. You may call this method
248
- * directly, but you must also handle token caching and token refreshing.
249
- *
250
- * @param scopes - The list of scopes for which the token will have access.
251
- * @param options - The options used to configure any requests this
252
- * TokenCredential implementation might make.
253
- */
254
- getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken | null>;
255
- }
256
-
257
- /**
258
- * An interface structurally compatible with OpenTelemetry.
259
- */
260
- export declare interface TracingContext {
261
- /**
262
- * Get a value from the context.
263
- *
264
- * @param key - key which identifies a context value
265
- */
266
- getValue(key: symbol): unknown;
267
- /**
268
- * Create a new context which inherits from this context and has
269
- * the given key set to the given value.
270
- *
271
- * @param key - context key for which to set the value
272
- * @param value - value to set for the given key
273
- */
274
- setValue(key: symbol, value: unknown): TracingContext;
275
- /**
276
- * Return a new context which inherits from this context but does
277
- * not contain a value for the given key.
278
- *
279
- * @param key - context key for which to clear a value
280
- */
281
- deleteValue(key: symbol): TracingContext;
282
- }
283
-
284
- export { }