HttpAuthCredentialDatabase class

Class that implements a singleton object (shared instance) which manages the shared HTTP auth credentials cache. On iOS and MacOS, this class uses the URLCredentialStorage class. On Android, this class has a custom implementation using android.database.sqlite.SQLiteDatabase because WebViewDatabase doesn't offer the same functionalities as iOS URLCredentialStorage.

Officially Supported Platforms/Implementations:

  • Android native WebView
  • iOS
  • MacOS

Constructors

HttpAuthCredentialDatabase()
Class that implements a singleton object (shared instance) which manages the shared HTTP auth credentials cache. On iOS and MacOS, this class uses the URLCredentialStorage class. On Android, this class has a custom implementation using android.database.sqlite.SQLiteDatabase because WebViewDatabase doesn't offer the same functionalities as iOS URLCredentialStorage.
HttpAuthCredentialDatabase.fromPlatform(PlatformHttpAuthCredentialDatabase platform)
Constructs a HttpAuthCredentialDatabase from a specific platform implementation.
HttpAuthCredentialDatabase.fromPlatformCreationParams(PlatformHttpAuthCredentialDatabaseCreationParams params)
Constructs a HttpAuthCredentialDatabase from creation params for a specific platform.

Properties

hashCode int
The hash code for this object.
no setterinherited
platform PlatformHttpAuthCredentialDatabase
Implementation of PlatformHttpAuthCredentialDatabase for the current platform.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearAllAuthCredentials() Future<void>
Removes all the HTTP auth credentials saved in the database.
getAllAuthCredentials() Future<List<URLProtectionSpaceHttpAuthCredentials>>
Gets a map list of all HTTP auth credentials saved. Each map contains the key protectionSpace of type URLProtectionSpace and the key credentials of type List<URLCredential> that contains all the HTTP auth credentials saved for that protectionSpace.
getHttpAuthCredentials({required URLProtectionSpace protectionSpace}) Future<List<URLCredential>>
Gets all the HTTP auth credentials saved for that protectionSpace.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeHttpAuthCredential({required URLProtectionSpace protectionSpace, required URLCredential credential}) Future<void>
Removes an HTTP auth credential for that protectionSpace.
removeHttpAuthCredentials({required URLProtectionSpace protectionSpace}) Future<void>
Removes all the HTTP auth credentials saved for that protectionSpace.
setHttpAuthCredential({required URLProtectionSpace protectionSpace, required URLCredential credential}) Future<void>
Saves an HTTP auth credential for that protectionSpace.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

instance() HttpAuthCredentialDatabase
Gets the HttpAuthCredentialDatabase shared instance.