StandardClaimAccessor mixin

The standard claims about a user, read from a claim map (OpenID Connect Core 1.0 §5.1): name, email, picture, and so on.

An OIDC user, its ID token and its user info all have them:

final user = login.user as OidcUser;
log.info('${user.fullName} <${user.email}>');

Spring (Java): StandardClaimAccessor.

Superclass constraints

Properties

address → Map<String, Object?>?
address: a JSON object (street_address, locality, ...).
no setter
birthdate → String?
birthdate, as written (YYYY-MM-DD, or a year alone).
no setter
claims → Map<String, Object?>
The claims, by name; cannot be modified.
no setterinherited
email → String?
email.
no setter
emailVerified → bool?
email_verified: whether the provider checked the email.
no setter
familyName → String?
family_name.
no setter
fullName → String?
name: the full name.
no setter
gender → String?
gender.
no setter
givenName → String?
given_name.
no setter
hashCode → int
The hash code for this object.
no setterinherited
locale → String?
locale, such as en-US.
no setter
middleName → String?
middle_name.
no setter
nickName → String?
nickname.
no setter
phoneNumber → String?
phone_number.
no setter
phoneNumberVerified → bool?
phone_number_verified.
no setter
picture → String?
picture: the URL of the picture.
no setter
preferredUsername → String?
preferred_username: the name the user goes by, not unique.
no setter
profile → String?
profile: the URL of the profile page.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
subject → String?
sub: the user's id at the provider; never changes for one user.
no setter
updatedAt → DateTime?
updated_at: when the profile last changed.
no setter
website → String?
website.
no setter
zoneInfo → String?
zoneinfo: the time zone, such as Europe/Paris.
no setter

Methods

getClaimAsBoolean(String name) → bool?
The claim name as a boolean: true / false or the strings "true" / "false"; null when absent or anything else.
inherited
getClaimAsInstant(String name) → DateTime?
The claim name as a time: seconds since 1970 (a NumericDate), in UTC; null when absent or not a number.
inherited
getClaimAsMap(String name) → Map<String, Object?>?
The claim name as a JSON object; null when absent or not an object.
inherited
getClaimAsString(String name) → String?
The claim name as text (toString() of a number); null when absent.
inherited
getClaimAsStringList(String name) → List<String>?
The claim name as a list of text: a single string gives a list of one; null when absent.
inherited
hasClaim(String name) → bool
Whether the claim name is present (even with a null value).
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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