setHttpAuthCredential method
- required URLProtectionSpace protectionSpace,
- required URLCredential credential,
Saves an HTTP auth credential for that protectionSpace.
Officially Supported Platforms/Implementations:
- Android WebView
- iOS WKWebView (Official API - URLCredentialStorage.set)
- macOS WKWebView (Official API - URLCredentialStorage.set)
- Linux WPE WebKit:
- Implemented using libsecret for secure storage.
Parameters - Officially Supported Platforms/Implementations:
protectionSpace: all platformscredential: all platforms
Use the PlatformHttpAuthCredentialDatabase.isMethodSupported method to check if this method is supported at runtime.
Implementation
Future<void> setHttpAuthCredential({
required URLProtectionSpace protectionSpace,
required URLCredential credential,
}) => platform.setHttpAuthCredential(
protectionSpace: protectionSpace,
credential: credential,
);