onAuthRequired property

EventStream<OnAuthRequiredEvent> get onAuthRequired

Fired when an authentication failure is received. The listener has three options: it can provide authentication credentials, it can cancel the request and display the error page, or it can take no action on the challenge. If bad user credentials are provided, this may be called multiple times for the same request. Note, only one of 'blocking' or 'asyncBlocking' modes must be specified in the extraInfoSpec parameter.

Implementation

EventStream<OnAuthRequiredEvent> get onAuthRequired =>
    $js.chrome.webRequest.onAuthRequired.asStream(($c) => (
          $js.OnAuthRequiredDetails details,
          JSFunction? asyncCallback,
        ) {
          return $c(OnAuthRequiredEvent(
            details: OnAuthRequiredDetails.fromJS(details),
            asyncCallback: asyncCallback,
          ));
        }.toJS);