onReceivedServerTrustAuthRequest method

  1. @override
FutureOr<ServerTrustAuthResponse?>? onReceivedServerTrustAuthRequest(
  1. ServerTrustChallenge challenge
)
inherited

Event fired when the WebView need to perform server trust authentication (certificate validation). The host application must return either ServerTrustAuthResponse instance with ServerTrustAuthResponseAction.CANCEL or ServerTrustAuthResponseAction.PROCEED.

challenge contains data about host, port, protocol, realm, etc. as specified in the ServerTrustChallenge.

NOTE for iOS and macOS: to override the certificate verification logic, you have to provide ATS (App Transport Security) exceptions in your iOS/macOS Info.plist. See NSAppTransportSecurity in the Information Property List Key Reference for details.

Officially Supported Platforms/Implementations:

Implementation

@override
FutureOr<ServerTrustAuthResponse?>? onReceivedServerTrustAuthRequest(
    ServerTrustChallenge challenge) {
  return null;
}