CarpUser class

Represents a CARP Web Service (CAWS) account and user.

Annotations
  • @JsonSerializable(fieldRename: FieldRename.snake, includeIfNull: false)

Constructors

CarpUser({required String username, required String id, required String firstName, required String lastName, required String email, required List roles, OAuthToken? token})
CarpUser.fromJson(Map<String, dynamic> json)
factory
CarpUser.fromJWT(Map<String, dynamic> jwt, OidcToken token)
factory

Properties

accountId String
no setter
email String
The user's email
getter/setter pair
firstName String
User's first name
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String
Unique CARP ID
getter/setter pair
isAuthenticated bool
Returns true if the user is logged in; that is, has a valid token.
no setter
isEmailVerified bool
Returns true if the user's email is verified.
no setter
lastName String
User's last name
getter/setter pair
roles List
The list of roles that this user has in CARP.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
token OAuthToken?
The OAuth 2.0 OAuthToken for this user, once authenticated to CARP. Is null if user is not authenticated.
getter/setter pair
username String
Unique CARP username
getter/setter pair

Methods

authenticated(OAuthToken token) → void
Set or update the authenticated OAuthToken token for this user.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
signOut() Future<void>
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