isValidWithAllScopes method

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

Returns true if the token is valid and has all of required scopes.

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

Implementation

bool isValidWithAllScopes(List<String> required, [DateTime? now]) =>
    isValid(now) && hasAllScopes(required);