isValidWithAnyScope method

bool isValidWithAnyScope(
  1. List<String> any, [
  2. DateTime? now
])

Returns true if the token is valid and has at least one of any scopes.

Combines isValid and hasAnyScope for convenience at request boundaries where both expiry and scope grants must be checked.

Implementation

bool isValidWithAnyScope(List<String> any, [DateTime? now]) =>
    isValid(now) && hasAnyScope(any);