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 aquedart 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.

Constructors

AuthScope(String? scopeString)
Creates an instance of this type from scopeString.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
modifier String?
The modifier of this scope, if it exists.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
segments Iterable<String?>
Individual segments, separated by : character, of this instance.
no setter

Methods

allows(String scopeString) bool
String variant of isSubsetOrEqualTo.
allowsScope(AuthScope incomingScope) bool
Alias of isSubsetOrEqualTo.
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 nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

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

Constants

any → const List<AuthScope>
Signifies 'any' scope in AuthServerDelegate.getAllowedScopes.