github Azure/azure-sdk-for-python corehttp_1.0.0b6

pre-release3 days ago

1.0.0b6 (2025-03-27)

Features Added

  • The TokenCredential and AsyncTokenCredential protocols have been updated to include a new get_token_info method. This method should be used to acquire tokens and return an AccessTokenInfo object. #38346
  • 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. #38346
  • 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. #38346
  • BearerTokenCredentialPolicy and AsyncBearerTokenCredentialPolicy now check if a credential has the get_token_info method defined. If so, the get_token_info method is used to acquire a token. #38346
    • These policies now also check the refresh_on attribute when determining if a new token request should be made.
  • Added model attribute to HttpResponseError to allow accessing error attributes based on a known model. #39636
  • Added auth_flows support in BearerTokenCredentialPolicy. #40084

Breaking Changes

  • The get_token method has been removed from the TokenCredential and AsyncTokenCredential protocols. Implementations should now use the new get_token_info method to acquire tokens. #38346
  • The AccessToken class has been removed and replaced with a new AccessTokenInfo class. #38346
  • BearerTokenCredentialPolicy and AsyncBearerTokenCredentialPolicy now rely on credentials having the get_token_info method defined. #38346

Don't miss a new azure-sdk-for-python release

NewReleases is sending notifications on new releases.