CarpUser class

Represents a CARP user.

Annotations

Constructors

CarpUser({@required String username, int id, String accountId, String firstName, String lastName, String phone, String email, String department, String organization})
CarpUser.fromJson(Map<String, dynamic> json)
factory

Properties

accountId String
The CARP account id.
read / write
created DateTime
Timestamp for the creation of this user.
read / write
department String
Department of the the user (e.g. CACHET)
read / write
email String
The user's email
read / write
firstName String
User's first name
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
id int
Unique CARP ID
read / write
isActivated bool
Is this user activated in any studies?
read / write
isAuthenticated bool
Returns true if the user is logged in; that is, has a valid token.
read-only
isEmailVerified bool
Returns true if the user's email is verified.
read-only
lastName String
User's last name
read / write
organization String
Organization of the the user (e.g. DTU)
read / write
phone String
Mobile phone number
read / write
role List<String>
The list of roles that this user has in CARP.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
termsAgreed DateTime
Timestamp for agreeing to the informed consent
read / write
token OAuthToken
The OAuth 2.0 OAuthToken for this user, once authenticated to CARP
read / write
username String
Unique CARP username
read / write

Methods

authenticated(OAuthToken token) → void
Set or update the authenticated OAuthToken token for this user.
delete() Future
Deletes the user record from the CARP web service. [...]
getOAuthToken({bool refresh = false}) Future<OAuthToken>
Obtains the OAuth token for the current user, forcing a refresh i f desired.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
reload() Future
Manually refreshes the data of the current user (e.g., fullName, telephone, etc.) from the CARP web service.
signOut() Future
Sign out the current user.
toJson() Map<String, dynamic>
toString() String
A string representation of this object. [...]
override

Operators

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