-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Core] Add new token class and protocols #36565
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
Conversation
|
API change check APIView has identified API level changes in this PR and created following API reviews. |
25b5a53 to
ef7f41b
Compare
sdk/core/azure-core/azure/core/pipeline/policies/_authentication.py
Outdated
Show resolved
Hide resolved
60904c4 to
dfa0f3a
Compare
3e39891 to
ab35a3b
Compare
sdk/core/azure-core/azure/core/pipeline/policies/_authentication.py
Outdated
Show resolved
Hide resolved
94ac2ea to
21d7dc3
Compare
Adding new protocols to enable more expansive access tokens. Signed-off-by: Paul Van Eck <[email protected]>
Signed-off-by: Paul Van Eck <[email protected]>
21d7dc3 to
74854d2
Compare
Signed-off-by: Paul Van Eck <[email protected]>
Signed-off-by: Paul Van Eck <[email protected]>
sdk/core/azure-core/azure/core/pipeline/policies/_authentication.py
Outdated
Show resolved
Hide resolved
sdk/core/azure-core/azure/core/pipeline/policies/_authentication_async.py
Show resolved
Hide resolved
Signed-off-by: Paul Van Eck <[email protected]>
Signed-off-by: Paul Van Eck <[email protected]>
Signed-off-by: Paul Van Eck <[email protected]>
Signed-off-by: Paul Van Eck <[email protected]>
|
CI failures are unrelated to the changes in this PR and have to do with engsys issues that cropped up recently. The failing pipelines just passed yesterday. |
mccoyp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
KV updates LGTM!
|
/check-enforcer override |
Add new AccessTokenInfo class and supporting protocols AsyncSupportsTokenInfo and SupportsTokenInfo. Signed-off-by: Paul Van Eck <[email protected]>
Here, we add a few new classes to core to support adding/using more data in access tokens received from credentials.
AccessTokenInfo: A new alternative class toAccessTokenwhich isn't tuple-based and supportsrefresh_onas well as future extensibility. This naming indicates it's more of a container class for a token and token metadata.SupportsTokenInfo: A newProtocolclass. This specifies the methodget_token_info.TokenRequestOptionswill be a TypeDict that will maintain the optional options for token requests, and will be used in theget_token_infomethod signature. This helps us move away from having to keep adding new kwargs toget_token's method signature every time we need to add new parameters.AsyncSupportsTokenInfo: The async counterpart toSupportsTokenInfo.Our
BearerTokenCredentialpolicies will check if a credential has theget_token_infomethod. If so, call it. Otherwise, just callget_token.