IICaller class

Caller implementation with a SubtleCryptoECDSAP256Keys session-key, an internet-identity login function, and save/load accross browser sessions using IndexDB.

Use the IICaller.login function to login a user with internet-identity.

Use the IICaller.indexdb_save and IICaller.indexdb_load functions to save/load the user accross browser sessions.

Inheritance

Constructors

IICaller({required SubtleCryptoECDSAP256Keys keys, required List<Legation> legations})

Properties

hashCode int
The hash code for this object.
no setterinherited
keys SubtleCryptoECDSAP256Keys
getter/setter pairoverride-getter
legations List<Legation>
finalinherited
principal Principal
latefinalinherited
public_key_DER Uint8List
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

indexdb_delete() → void
indexdb_save() Future<void>
Saves this IICaller into the browser's IndexDB making it possible to store this logged in user accross browser sessions even when the SubtleCrypto session-private-key extractable property is set to false.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

indexdb_load() Future<IICaller?>
Loads the user that is saved in the IndexDB if there is one.
login({Duration valid_duration = const Duration(days: 30), String? derivation_origin, String ii_url = 'https://identity.ic0.app'}) Future<IICaller>
Performs the internet-identity login flow with a SubtleCrypto session key with the extractable property set to false for the highest security.