missingScopes method

List<String> missingScopes(
  1. List<String> granted,
  2. Iterable<String> needed
)

The needed scopes granted does not cover, honouring scopeImplies.

Implementation

List<String> missingScopes(List<String> granted, Iterable<String> needed) => [
      for (final r in needed)
        if (!granted.any((g) => g == r || (scopeImplies?.call(g, r) ?? false))) r,
    ];