github Azure/azure-sdk-for-js @azure/core-rest-pipeline_1.1.0-beta.1

latest releases: @azure/arm-guestconfiguration_1.0.0-beta.1, @azure/arm-selfhelp_2.0.0-beta.3, @azure/template_1.0.12-beta.3738128...
pre-release2 years ago

1.1.0-beta.1 (2021-05-06)

Features Added

  • Add a new bearerTokenChallengeAuthenticationPolicy that provides a skeleton of handling challenge-based authorization. There are two extensible points: authorizeRequest and authorizeRequestOnChallenge callbacks.
    • authorizeRequest allows customizing the policy to alter how it authorizes a request before sending it. By default when no callbacks are specified, this policy has the same behavior as bearerTokenAuthenticationPolicy. It will retrieve the token from the underlying token credential, and if it gets one, it will cache the token and set it to the outgoing request.
    • authorizeRequestOnChallenge, which gets called only if we've found a challenge in the response. This callback has access to the original request and its response and is expected to handle the challenge. If this callback returns true, the request, usually updated after handling the challenge, will be sent again. If this call back returns false, no further actions will be taken.

Fixed

  • Rewrote bearerTokenAuthenticationPolicy to use a new backend that refreshes tokens only when they're about to expire and not multiple times before. This is based on a similar fix implemented on @azure/core-http@1.2.4 (PR with the changes). This fixes the issue: 13369.
  • Delay loading of NO_PROXY environment variable until when request pipeline is being created. This fixes issue 14873

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

NewReleases is sending notifications on new releases.