verify method

Future<bool> verify(
  1. JsonWebKeyStore keyStore, {
  2. List<String>? allowedArguments,
})

Attempts to verify this JWT

Implementation

Future<bool> verify(JsonWebKeyStore keyStore,
    {List<String>? allowedArguments}) async {
  try {
    await _joseObject.getPayload(keyStore,
        allowedAlgorithms: allowedArguments);
    return _verified = true;
  } catch (e) {
    return _verified = false;
  }
}