-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[core-rest-pipeline] Challenge callbacks #13888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9795395
10f90df
f37ce5a
1f682a6
85d52c1
8fcc45b
b1df5f9
2cce476
8fa9ec1
ebbed8a
272d240
fa0646c
a8a7a50
b0a8337
663d7eb
435776e
480ac2c
670ce25
d6b32a2
87d4b55
dda4039
ee68f6c
0a09732
83720b2
a68a673
5e0a716
10ca6e5
c9e6c47
9f31ecf
a789c76
633dfe9
b300a51
b44184a
b387796
5a4d88b
d260f63
9fe1712
e4ec342
ab1c2e4
892ee7c
d54547c
9da2dd6
6631d38
9a3e758
c1c1213
9c97a64
dbf2e1f
06e6854
e28bb35
373589d
1f2d6a3
fa118af
ce29fbf
e78d193
5ff8119
4b14121
0c2392a
5314922
e9b8a8d
0d89d9d
5b64e51
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,9 @@ | |
| ```ts | ||
|
|
||
| import { AbortSignalLike } from '@azure/abort-controller'; | ||
| import { AccessToken } from '@azure/core-auth'; | ||
| import { Debugger } from '@azure/logger'; | ||
| import { GetTokenOptions } from '@azure/core-auth'; | ||
| import { OperationTracingOptions } from '@azure/core-tracing'; | ||
| import { TokenCredential } from '@azure/core-auth'; | ||
|
|
||
|
|
@@ -26,6 +28,21 @@ export interface Agent { | |
| sockets: unknown; | ||
| } | ||
|
|
||
| // @public | ||
| export interface AuthorizeRequestOnChallengeOptions { | ||
| getAccessToken: (scopes: string[], options: GetTokenOptions) => Promise<AccessToken | null>; | ||
| request: PipelineRequest; | ||
| response: PipelineResponse; | ||
| scopes: string[]; | ||
| } | ||
|
|
||
| // @public | ||
| export interface AuthorizeRequestOptions { | ||
| getAccessToken: (scopes: string[], options: GetTokenOptions) => Promise<AccessToken | null>; | ||
| request: PipelineRequest; | ||
| scopes: string[]; | ||
| } | ||
|
|
||
| // @public | ||
| export function bearerTokenAuthenticationPolicy(options: BearerTokenAuthenticationPolicyOptions): PipelinePolicy; | ||
|
|
||
|
|
@@ -38,6 +55,25 @@ export interface BearerTokenAuthenticationPolicyOptions { | |
| scopes: string | string[]; | ||
| } | ||
|
|
||
| // @public | ||
| export function bearerTokenChallengeAuthenticationPolicy(options: BearerTokenChallengeAuthenticationPolicyOptions): PipelinePolicy; | ||
|
|
||
| // @public | ||
| export const bearerTokenChallengeAuthenticationPolicyName = "bearerTokenChallengeAuthenticationPolicy"; | ||
|
|
||
| // @public | ||
| export interface BearerTokenChallengeAuthenticationPolicyOptions { | ||
| challengeCallbacks?: ChallengeCallbacks; | ||
|
xirzec marked this conversation as resolved.
|
||
| credential: TokenCredential; | ||
| scopes: string[]; | ||
| } | ||
|
|
||
| // @public | ||
| export interface ChallengeCallbacks { | ||
| authorizeRequest?(options: AuthorizeRequestOptions): Promise<void>; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if we should rename this to
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This name is picked for x-language consistency. I think it's an advanced scenario to implement CAE so I'd expect developers to learn more about it. |
||
| authorizeRequestOnChallenge?(options: AuthorizeRequestOnChallengeOptions): Promise<boolean>; | ||
| } | ||
|
|
||
| // @public | ||
| export function createDefaultHttpClient(): HttpClient; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT license. | ||
|
|
||
| export const SDK_VERSION: string = "1.0.4"; | ||
| export const SDK_VERSION: string = "1.1.0-beta.1"; |
Uh oh!
There was an error while loading. Please reload this page.