DVApiScopes class final

The scopes an application declares under dartvel.platformApi.scopes.

Constructors

DVApiScopes(Map<String, List<String>> scopes, {Map<String, String> descriptions = const <String, String>{}})
DVApiScopes.fromConfig(Map<String, Object?> platformApi)
Reads the dartvel.platformApi map from pubspec.yaml.
factory

Properties

descriptions → Map<String, String>
Consent-screen wording, by scope name.
final
hashCode → int
The hash code for this object.
no setterinherited
names → Set<String>
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

actionsFor(String scope) → Set<String>
The actions scope grants, or an empty set when it is not declared.
actionsOf(Iterable<String> scopes) → Set<String>
Every action scopes grant between them. A name that is not declared grants nothing: names are looked up whole, never matched as prefixes.
covers(Iterable<String> granted, String action) → bool
Whether granted covers action, compared whole.
defines(String scope) → bool
Whether scope is declared, by its whole name.
describe(String scope) → String
The words a consent screen uses for scope.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requireDeclared(Iterable<String> scopes) → void
Throws DVUndeclaredApiScope when any of scopes is not declared.
toString() → String
A string representation of this object.
inherited
undeclared(Iterable<String> scopes) → List<String>
The names in scopes this application does not declare.
validateAgainst(Set<String> registeredPolicies) → void
Fails with DV-APIKEY-001 when a scope names an action no registered policy defines.

Operators

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

Static Methods

actionName(String resource, String action) → String
The action DV.Auth.authorization checks for action on resource.
policyKeyOf(String action) → String
The key DV.Auth.authorization registers action under: Order.view is view:Order.