Class UserInfo
- Namespace
- Auth0.AuthenticationApi.Models
- Assembly
- Auth0.AuthenticationApi.dll
Represents user information returned from a standard OpenID Connect /userinfo
endpoint.
public class UserInfo
- Inheritance
-
UserInfo
- Inherited Members
Remarks
See http://openid.net/specs/openid-connect-core-1_0.html#StandardClaims for more details.
Properties
AdditionalClaims
Additional claims about the user.
[JsonExtensionData]
public IDictionary<string, JToken> AdditionalClaims { get; set; }
Property Value
- IDictionary<string, JToken>
Address
User's preferred postal/mailing address.
[JsonProperty("address")]
public UserInfoAddress Address { get; set; }
Property Value
Birthdate
Gets or sets the user's birthday, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed.
[JsonProperty("birthdate")]
public string Birthdate { get; set; }
Property Value
User's preferred e-mail address.
[JsonProperty("email")]
public string Email { get; set; }
Property Value
Remarks
You MUST NOT rely upon this value being unique.
EmailVerified
Whether the user's email address has been verified or not.
[JsonProperty("email_verified")]
public bool? EmailVerified { get; set; }
Property Value
- bool?
Remarks
When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the user at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating.
FirstName
Given name(s) or first name(s) of the user.
[JsonProperty("given_name")]
public string FirstName { get; set; }
Property Value
Remarks
May contain multiple given names separated by space characters.
FullName
Full name of the user in displayable form including all name parts, possibly including titles and suffixes, ordered according to the user's locale and preferences.
[JsonProperty("name")]
public string FullName { get; set; }
Property Value
Gender
User's gender.
[JsonProperty("gender")]
public string Gender { get; set; }
Property Value
Remarks
Values defined by the specification include female
and male
.
Other values MAY be used when neither of the defined values are applicable.
LastName
Surname(s) or last name(s) of the user.
[JsonProperty("family_name")]
public string LastName { get; set; }
Property Value
Remarks
May contain multiple given names separated by space characters or no family name at all.
Locale
User's locale, represented as a BCP47 language tag.
[JsonProperty("locale")]
[JsonConverter(typeof(StringOrObjectAsStringConverter))]
public string Locale { get; set; }
Property Value
Examples
en-US
or fr-CA
Remarks
Typically an ISO 639-1 Alpha-2 language code in lowercase and an ISO 3166-1 Alpha-2 country code in uppercase, separated by a dash.
MiddleName
Middle name(s) of the user.
[JsonProperty("middle_name")]
public string MiddleName { get; set; }
Property Value
Remarks
May contain multiple middle names separated by space characters.
NickName
Casual name of the user that may or may not be the same as FirstName.
[JsonProperty("nickname")]
public string NickName { get; set; }
Property Value
Examples
Nickname of 'Mike' might be returned for a FirstName of Michael
.
PhoneNumber
User's preferred telephone number.
[JsonProperty("phone_number")]
public string PhoneNumber { get; set; }
Property Value
Examples
+1 (425) 555-1212
or +1 (604) 555-1234;ext=5678.
Remarks
E.164 is the RECOMMENDED format. If the phone number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 extension syntax.
PhoneNumberVerified
Whether the user's phone number has been verified or not.
[JsonProperty("phone_number_verified")]
public bool? PhoneNumberVerified { get; set; }
Property Value
- bool?
Remarks
When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the user at the time the verification was performed. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format.
Picture
URL of the user's profile picture.
[JsonProperty("picture")]
public string Picture { get; set; }
Property Value
Remarks
Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the user, rather than an arbitrary photo taken by the user.
PreferredUsername
Shorthand name by which the user wishes to be referred to at the RP, such as janedoe or j.doe.
[JsonProperty("preferred_username")]
public string PreferredUsername { get; set; }
Property Value
Remarks
MAY be any valid JSON string including special characters such as @, /, or whitespace. You MUST NOT rely upon this value being unique.
Profile
URL of the user's profile page.
[JsonProperty("profile")]
public string Profile { get; set; }
Property Value
Remarks
The contents of this Web page SHOULD be about the End-User.
UpdatedAt
Time and date the user's information was last updated.
[JsonProperty("updated_at")]
[JsonConverter(typeof(FlexibleDateTimeConverter))]
public DateTime? UpdatedAt { get; set; }
Property Value
UserId
Subject-Identifier for the user at the issuer. A unique value to identify the user.
[JsonProperty("sub")]
public string UserId { get; set; }
Property Value
Website
URL of the user's Web page or blog.
[JsonProperty("website")]
public string Website { get; set; }
Property Value
Remarks
This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with.
ZoneInformation
User's time zone as a "tz database name".
[JsonProperty("zoneinfo")]
public string ZoneInformation { get; set; }
Property Value
Examples
Europe/Paris
or America/Los_Angeles
.
Remarks
See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for more details.