AuthClient.fromJson constructor
AuthClient.fromJson(
- String scheme,
- AuthFunction authFunction,
- Map<
String, dynamic> map, - Uri? authUri,
Implementation
factory AuthClient.fromJson(
String scheme,
AuthFunction authFunction,
Map<String, dynamic> map,
Uri? authUri,
) {
final fromStorageResult = AuthClient.fromStorage(jsonEncode(map));
final Identity? identity = fromStorageResult.delegationIdentity;
return AuthClient(
scheme: scheme,
authFunction: authFunction,
identity: identity ?? const AnonymousIdentity(),
key: fromStorageResult.signIdentity,
chain: fromStorageResult.delegationChain,
authUri: authUri,
);
}