DVBackendPolicy class

The gate the generated backend router calls before running a function.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

decide ↔ Future<bool> Function(String policy, String path)?
What decides. Set by the application from its own auth.
getter/setter pair

Static Methods

allows(String policy, String path) → Future<bool>
Whether this request may run a function guarded by policy.
allowsAction(String action, String path) → Future<bool>
Whether this request may run a function guarded by action, a Resource.action such as Order.view.
callerFor(String action) → Object?
Who the registered policy for action is asked about on this request.
checkAction(String action, String path) → Future<DVPolicyDecision>
allowsAction, saying why a refusal is one: in the same order, with DVPolicyDecision.unauthenticated where the registered policy would be asked with no caller and its user parameter is not nullable. Every other refusal -- outside a key's scopes, an action nothing registered, decide saying no, a caller the policy cannot take, the policy saying no -- is DVPolicyDecision.forbidden.
isAction(String policy) → bool
Whether policy names a Resource.action a registry can answer.
verifyRegistered(Iterable<String> actions) → void
Refuses to start a server whose routes declare an action nothing has registered.