removeHttpAuthCredential method

  1. @override
Future<void> removeHttpAuthCredential({
  1. required URLProtectionSpace protectionSpace,
  2. required URLCredential credential,
})

Removes an HTTP auth credential for that protectionSpace.

Officially Supported Platforms/Implementations:

Implementation

@override
Future<void> removeHttpAuthCredential(
    {required URLProtectionSpace protectionSpace,
    required URLCredential credential}) async {
  Map<String, dynamic> args = <String, dynamic>{};
  args.putIfAbsent("host", () => protectionSpace.host);
  args.putIfAbsent("protocol", () => protectionSpace.protocol);
  args.putIfAbsent("realm", () => protectionSpace.realm);
  args.putIfAbsent("port", () => protectionSpace.port);
  args.putIfAbsent("username", () => credential.username);
  args.putIfAbsent("password", () => credential.password);
  await channel?.invokeMethod('removeHttpAuthCredential', args);
}