AuthScope class Null safety

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 conduit 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. [...]


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


allows(String scopeString) bool
String variant of isSubsetOrEqualTo. [...]
allowsScope(AuthScope incomingScope) bool
Alias of isSubsetOrEqualTo.
@Deprecated('Use AuthScope.isSubsetOrEqualTo() instead')
isExactly(String scopeString) bool
String variant of isExactlyScope. [...]
isExactlyScope(AuthScope scope) bool
Whether or not two scopes are exactly the same.
isSubsetOrEqualTo(AuthScope incomingScope) bool
Whether or not this instance is a subset or equal to incomingScope. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
A string representation of this object. [...]


operator ==(Object 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. [...]
[AuthScope._("_scope:_constant:_marker", [], null)]