Authorization class Null safety

Authorization information for a Request after it has passed through an Authorizer.

After a request has passed through an Authorizer, an instance of this type is created and attached to the request (see Request.authorization). Instances of this type contain the information that the Authorizer obtained from an AuthValidator (typically an AuthServer) about the validity of the credentials in a request.

Constructors

Authorization(String? clientID, int? ownerID, AuthValidator? validator, {AuthBasicCredentials? credentials, List<AuthScope>? scopes})
Creates an instance of a Authorization.

Properties

clientID String?
The client ID the permission was granted under.
final
credentials AuthBasicCredentials?
Basic authorization credentials, if provided.
final
hashCode int
The hash code for this object.
read-onlyinherited
ownerID int?
The identifier for the owner of the resource, if provided.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
scopes List<AuthScope>?
The list of scopes this authorization has access to.
read / write
validator AuthValidator?
The AuthValidator that granted this permission.
final

Methods

isAuthorizedForScope(String scope) bool
Whether or not this instance has access to a specific scope.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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