User class

Available Extensions

Constructors

User({String? id, String? rev, int? deletionDate, int? created, String? name, Set<Property> properties = const {}, Set<String> roles = const {}, String? login, String? passwordHash, String? secret, bool? use2fa, String? groupId, String? healthcarePartyId, String? patientId, String? deviceId, Map<String, Set<String>> autoDelegations = const {}, String? email, String? mobilePhone, Map<String, AuthenticationToken> authenticationTokens = const {}, UserStatus? status})
Returns a new User instance.

Properties

authenticationTokens Map<String, AuthenticationToken>
Encrypted and time-limited Authentication tokens used for inter-applications authentication
getter/setter pair
autoDelegations Map<String, Set<String>>
Delegations that are automatically generated client side when a new database object is created by this user
getter/setter pair
created int?
the creation date of the user (encoded as epoch).
getter/setter pair
deletionDate int?
the soft delete timestamp. When a user is ”deleted“, this is set to a non null value: the moment of the deletion
getter/setter pair
deviceId String?
Id of the patient if the user is a patient
getter/setter pair
email String?
email address of the user (used for token exchange or password recovery).
getter/setter pair
groupId String?
id of the group (practice/hospital) the user is member of
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
healthcarePartyId String?
Id of the healthcare party if the user is a healthcare party.
getter/setter pair
id String?
the Id of the user. We encourage using either a v4 UUID or a HL7 Id.
getter/setter pair
login String?
Username for this user. We encourage using an email address
getter/setter pair
mobilePhone String?
mobile phone of the user (used for token exchange or password recovery).
getter/setter pair
name String?
Last name of the user. This is the official last name that should be used for official administrative purposes.
getter/setter pair
passwordHash String?
Hashed version of the password (BCrypt is used for hashing)
getter/setter pair
patientId String?
Id of the patient if the user is a patient
getter/setter pair
properties Set<Property>
Extra properties for the user. Those properties are typed (see class Property)
getter/setter pair
rev String?
the revision of the user in the database, used for conflict management / optimistic locking.
getter/setter pair
roles Set<String>
Roles assigned to this user
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secret String?
Secret token used to verify 2fa
getter/setter pair
status UserStatus?
Status of the current user
getter/setter pair
use2fa bool?
Whether the user has activated two factors authentication
getter/setter pair

Methods

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

Operators

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

Static Methods

fromJson(dynamic value) User?
Returns a new User instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) List<User>?
mapFromJson(dynamic json) Map<String, User>
mapListFromJson(dynamic json, {bool growable = false}) Map<String, List<User>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.