allowedScopes property

List<AuthScope>? allowedScopes

The list of scopes available when authorizing with this client.

Scoping is determined by this instance; i.e. the authorizing client determines which scopes a token has. This list contains all valid scopes for this client. If null, client does not support scopes and all access tokens have same authorization.

Implementation

List<AuthScope>? get allowedScopes => _allowedScopes;
void allowedScopes=(List<AuthScope>? scopes)

Implementation

set allowedScopes(List<AuthScope>? scopes) {
  _allowedScopes = scopes?.where((s) {
    return !scopes.any((otherScope) =>
        s.isSubsetOrEqualTo(otherScope) && !s.isExactlyScope(otherScope));
  }).toList();
}