APIAuthentication class

Constructors

APIAuthentication(APIToken token, {List<APIPermission>? permissions, bool resumed = false, dynamic data, APICredential? credential})
APIAuthentication.fromJson(Map json)
factory
APIAuthentication.system(String username, {List<APIPermission>? permissions, Duration duration = const Duration(days: 1)})
An internal authentication of the system itself (e.g. a scheduled call of an APICronJob), named username: not issued to any client (no credential, not stored), it's set directly in an APIRequest built by the server and passes the authenticated route rules.
factory

Properties

credential → APICredential
no setter
data → dynamic
final
hashCode → int
The hash code for this object.
no setterinherited
isSystem → bool
true if this is a system authentication (APIAuthentication.system).
no setter
permissions → List<APIPermission>
final
resumed → bool
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
token → APIToken
final
tokenKey → String
no setter
username → String
no setter

Methods

containsPermissionOfType(String type) → bool
enabledPermissions({DateTime? now}) → List<APIPermission>
enabledPermissionsOfType(String type, {DateTime? now}) → List<APIPermission>
enabledPermissionsOfTypes(Iterable<String> types, {DateTime? now}) → List<APIPermission>
enabledPermissionsWhere(bool test(APIPermission permission), {DateTime? now}) → List<APIPermission>
firstPermissionOfType(String type) → APIPermission?
isExpired({DateTime? now}) → bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

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