authorizedForScope method

bool authorizedForScope (String scope)

Whether or not this instance has access to a specific scope.

This method checks each element in scopes for any that gives privileges to access scope.

Implementation

bool authorizedForScope(String scope) {
  var asScope = new AuthScope(scope);
  return _scopes?.any((s) => asScope.allowsScope(s)) ?? false;
}