AuthClient.fromMap constructor

AuthClient.fromMap(
  1. String scheme,
  2. AuthFunction authFunction,
  3. Map<String, dynamic> map,
  4. Uri? authUri,
)

Implementation

factory AuthClient.fromMap(String scheme, AuthFunction authFunction,
    Map<String, dynamic> map, Uri? authUri) {
  var fromStorageResult = AuthClient.fromStorage(jsonEncode(map));
  Identity? identity = fromStorageResult.delegationIdentity;

  return AuthClient(
      scheme: scheme,
      authFunction: authFunction,
      identity: identity ?? AnonymousIdentity(),
      key: fromStorageResult.signIdentity,
      chain: fromStorageResult.delegationChain,
      authUri: authUri);
}