loadCra static method

Future<CraCredential?> loadCra({
  1. required String realmUri,
  2. required String authId,
})

Implementation

static Future<CraCredential?> loadCra({
  required String realmUri,
  required String authId,
}) async {
  final repo = _provider;
  if (repo == null) {
    return null;
  }
  try {
    final credential = await repo.loadCra(realmUri: realmUri, authId: authId);
    _emit(
      method: 'wampcra',
      realmUri: realmUri,
      authId: authId,
      hit: credential != null,
    );
    return credential;
  } on CredentialRejection catch (rejection) {
    _emit(
      method: 'wampcra',
      realmUri: realmUri,
      authId: authId,
      hit: false,
      rejection: rejection,
    );
    rethrow;
  }
}