AuthScope class

Instances represent OAuth 2.0 scope.

An OAuth 2.0 token may optionally have authorization scopes. An authorization scope provides more granular authorization to protected resources. Without authorization scopes, any valid token can pass through an Authorizer.bearer. Scopes allow Authorizers to restrict access to routes that do not have the appropriate scope values.

An AuthClient has a list of valid scopes (see aqueduct auth tool). An access token issued for an AuthClient may ask for any of the scopes the client provides. Scopes are then granted to the access token. An Authorizer may specify a one or more required scopes that a token must have to pass to the next controller.


AuthScope(String scopeString)
Creates an instance of this type from scopeString. [...]


modifier → String
The modifier of this scope, if it exists. [...]
segments → Iterable<String>
Individual segments, separated by : character, of this instance. [...]
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited


allows(String scopeString) → bool
String variant of allowsScope. [...]
allowsScope(AuthScope incomingScope) → bool
Whether or not incomingScope has at least the same scoping access as this instance. [...]
isExactly(String scopeString) → bool
String variant of isExactlyScope. [...]
isExactlyScope(AuthScope scope) → bool
Whether or not two scopes are exactly the same.
isSubsetOrEqualTo(AuthScope scope) → bool
Whether or not this instance is a subset or equal to scope. [...]
toString() → String
Returns a string representation of this object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.


operator ==(dynamic other) → bool
The equality operator.

Static Methods

verify(List<AuthScope> requiredScopes, List<AuthScope> providedScopes) → bool
Returns true if that providedScopes fulfills requiredScopes. [...]


any → const List<AuthScope>
Signifies 'any' scope in AuthServerDelegate.getAllowedScopes. [...]
const [const AuthScope._("_scope:_constant:_marker", const [], null)]