You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add new AccessTokenInfo class and supporting protocols
AsyncSupportsTokenInfo and SupportsTokenInfo.
Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
Copy file name to clipboardExpand all lines: sdk/core/azure-core/CHANGELOG.md
+7-3Lines changed: 7 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,13 @@
4
4
5
5
### Features Added
6
6
7
-
-`AccessToken` now has an optional `refresh_on` attribute that can be used to specify when the token should be refreshed. #36183
8
-
-`BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now check the `refresh_on` attribute when determining if a token request should be made.
9
-
- Added `azure.core.AzureClouds` enum to represent the different Azure clouds.
7
+
- Added azure.core.AzureClouds enum to represent the different Azure clouds.
8
+
- Added two new credential protocol classes, `SupportsTokenInfo` and `AsyncSupportsTokenInfo`, to offer more extensibility in supporting various token acquisition scenarios. #36565
9
+
- Each new protocol class defines a `get_token_info` method that returns an `AccessTokenInfo` object.
10
+
- Added a new `TokenRequestOptions` class, which is a `TypedDict` with optional parameters, that can be used to define options for token requests through the `get_token_info` method. #36565
11
+
- Added a new `AccessTokenInfo` class, which is returned by `get_token_info` implementations. This class contains the token, its expiration time, and optional additional information like when a token should be refreshed. #36565
12
+
-`BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now first check if a credential has the `get_token_info` method defined. If so, the `get_token_info` method is used to acquire a token. Otherwise, the `get_token` method is used. #36565
13
+
- These policies now also check the `refresh_on` attribute when determining if a new token request should be made.
0 commit comments