Class UserInfo
- java.lang.Object
-
- com.nimbusds.openid.connect.sdk.claims.ClaimsSet
-
- com.nimbusds.openid.connect.sdk.claims.UserInfo
-
public class UserInfo extends ClaimsSet
UserInfo claims set, serialisable to a JSON object.Supports normal, aggregated and distributed claims.
Example UserInfo claims set:
{ "sub" : "248289761001", "name" : "Jane Doe", "given_name" : "Jane", "family_name" : "Doe", "preferred_username" : "j.doe", "email" : "janedoe@example.com", "picture" : "http://example.com/janedoe/me.jpg" }Related specifications:
- OpenID Connect Core 1.0, sections 5.1 and 5.6.
-
-
Field Summary
Fields Modifier and Type Field Description static StringADDRESS_CLAIM_NAMEThe address claim name.static StringAUD_CLAIM_NAMEThe audience claim name.static StringBIRTHDATE_CLAIM_NAMEThe birth date claim name.static StringEMAIL_CLAIM_NAMEThe email claim name.static StringEMAIL_VERIFIED_CLAIM_NAMEThe email verified claim name.static StringFAMILY_NAME_CLAIM_NAMEThe family name claim name.static StringGENDER_CLAIM_NAMEThe gender claim name.static StringGIVEN_NAME_CLAIM_NAMEThe given name claim name.static StringISS_CLAIM_NAMEThe issuer claim name.static StringLOCALE_CLAIM_NAMEThe locale claim name.static StringMIDDLE_NAME_CLAIM_NAMEThe middle name claim name.static StringNAME_CLAIM_NAMEThe name claim name.static StringNICKNAME_CLAIM_NAMEThe nickname claim name.static StringPHONE_NUMBER_CLAIM_NAMEThe phone number claim name.static StringPHONE_NUMBER_VERIFIED_CLAIM_NAMEThe phone number verified claim name.static StringPICTURE_CLAIM_NAMEThe picture claim name.static StringPREFERRED_USERNAME_CLAIM_NAMEThe preferred username claim name.static StringPROFILE_CLAIM_NAMEThe profile claim name.static StringSUB_CLAIM_NAMEThe subject claim name.static StringUPDATED_AT_CLAIM_NAMEThe updated at claim name.static StringWEBSITE_CLAIM_NAMEThe website claim name.static StringZONEINFO_CLAIM_NAMEThe zoneinfo claim name.
-
Constructor Summary
Constructors Constructor Description UserInfo(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet)Creates a new UserInfo claims set from the specified JSON Web Token (JWT) claims set.UserInfo(Subject sub)Creates a new minimal UserInfo claims set.UserInfo(net.minidev.json.JSONObject jsonObject)Creates a new UserInfo claims set from the specified JSON object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddAggregatedClaims(AggregatedClaims aggregatedClaims)Adds the specified aggregated claims provided by an external claims source.voidaddDistributedClaims(DistributedClaims distributedClaims)Adds the specified distributed claims from an external claims source.AddressgetAddress()Gets the preferred address.AddressgetAddress(com.nimbusds.langtag.LangTag langTag)Gets the preferred address.Map<com.nimbusds.langtag.LangTag,Address>getAddressEntries()Gets the preferred address entries.Set<AggregatedClaims>getAggregatedClaims()Gets the included aggregated claims provided by each external claims source.List<Audience>getAudience()Gets the audience.StringgetBirthdate()Gets the date of birth.Set<DistributedClaims>getDistributedClaims()Gets the included distributed claims provided by each external claims source.javax.mail.internet.InternetAddressgetEmail()Deprecated.StringgetEmailAddress()Gets the preferred email address.BooleangetEmailVerified()Gets the email verification status.StringgetFamilyName()Gets the surname or last name.StringgetFamilyName(com.nimbusds.langtag.LangTag langTag)Gets the surname or last name.Map<com.nimbusds.langtag.LangTag,String>getFamilyNameEntries()Gets the surname or last name entries.GendergetGender()Gets the gender.StringgetGivenName()Gets the given or first name.StringgetGivenName(com.nimbusds.langtag.LangTag langTag)Gets the given or first name.Map<com.nimbusds.langtag.LangTag,String>getGivenNameEntries()Gets the given or first name entries.IssuergetIssuer()Gets the issuer.StringgetLocale()Gets the locale.StringgetMiddleName()Gets the middle name.StringgetMiddleName(com.nimbusds.langtag.LangTag langTag)Gets the middle name.Map<com.nimbusds.langtag.LangTag,String>getMiddleNameEntries()Gets the middle name entries.StringgetName()Gets the full name.StringgetName(com.nimbusds.langtag.LangTag langTag)Gets the full name.Map<com.nimbusds.langtag.LangTag,String>getNameEntries()Gets the full name entries.StringgetNickname()Gets the casual name.StringgetNickname(com.nimbusds.langtag.LangTag langTag)Gets the casual name.Map<com.nimbusds.langtag.LangTag,String>getNicknameEntries()Gets the casual name entries.StringgetPhoneNumber()Gets the preferred telephone number.BooleangetPhoneNumberVerified()Gets the phone number verification status.URIgetPicture()Gets the picture.StringgetPreferredUsername()Gets the preferred username.URIgetProfile()Gets the profile page.static Set<String>getStandardClaimNames()Gets the names of the standard top-level UserInfo claims.SubjectgetSubject()Gets the UserInfo subject.DategetUpdatedTime()Gets the time the end-user information was last updated.URIgetWebsite()Gets the web page or blog.StringgetZoneinfo()Gets the zoneinfo.static UserInfoparse(String json)Parses a UserInfo claims set from the specified JSON object string.voidputAll(UserInfo other)Puts all claims from the specified other UserInfo claims set.voidsetAddress(Address address)Sets the preferred address.voidsetAddress(Address address, com.nimbusds.langtag.LangTag langTag)Sets the preferred address.voidsetAudience(Audience aud)Sets the audience.voidsetAudience(List<Audience> audList)Sets the audience list.voidsetBirthdate(String birthdate)Sets the date of birth.voidsetEmail(javax.mail.internet.InternetAddress email)Deprecated.voidsetEmailAddress(String email)Sets the preferred email address.voidsetEmailVerified(Boolean emailVerified)Sets the email verification status.voidsetFamilyName(String familyName)Sets the surname or last name.voidsetFamilyName(String familyName, com.nimbusds.langtag.LangTag langTag)Sets the surname or last name.voidsetGender(Gender gender)Sets the gender.voidsetGivenName(String givenName)Sets the given or first name.voidsetGivenName(String givenName, com.nimbusds.langtag.LangTag langTag)Sets the given or first name.voidsetIssuer(Issuer iss)Sets the issuer.voidsetLocale(String locale)Sets the locale.voidsetMiddleName(String middleName)Sets the middle name.voidsetMiddleName(String middleName, com.nimbusds.langtag.LangTag langTag)Sets the middle name.voidsetName(String name)Sets the full name.voidsetName(String name, com.nimbusds.langtag.LangTag langTag)Sets the full name.voidsetNickname(String nickname)Sets the casual name.voidsetNickname(String nickname, com.nimbusds.langtag.LangTag langTag)Sets the casual name.voidsetPhoneNumber(String phoneNumber)Sets the preferred telephone number.voidsetPhoneNumberVerified(Boolean phoneNumberVerified)Sets the email verification status.voidsetPicture(URI picture)Sets the picture.voidsetPreferredUsername(String preferredUsername)Sets the preferred username.voidsetProfile(URI profile)Sets the profile page.voidsetUpdatedTime(Date updatedTime)Sets the time the end-user information was last updated.voidsetWebsite(URI website)Sets the web page or blog.voidsetZoneinfo(String zoneinfo)Sets the zoneinfo.-
Methods inherited from class com.nimbusds.openid.connect.sdk.claims.ClaimsSet
getBooleanClaim, getClaim, getClaim, getDateClaim, getEmailClaim, getLangTaggedClaim, getNumberClaim, getStringClaim, getStringClaim, getStringListClaim, getURIClaim, getURLClaim, putAll, putAll, setClaim, setClaim, setDateClaim, setEmailClaim, setURIClaim, setURLClaim, toJSONObject, toJWTClaimsSet
-
-
-
-
Field Detail
-
SUB_CLAIM_NAME
public static final String SUB_CLAIM_NAME
The subject claim name.- See Also:
- Constant Field Values
-
ISS_CLAIM_NAME
public static final String ISS_CLAIM_NAME
The issuer claim name.- See Also:
- Constant Field Values
-
AUD_CLAIM_NAME
public static final String AUD_CLAIM_NAME
The audience claim name.- See Also:
- Constant Field Values
-
NAME_CLAIM_NAME
public static final String NAME_CLAIM_NAME
The name claim name.- See Also:
- Constant Field Values
-
GIVEN_NAME_CLAIM_NAME
public static final String GIVEN_NAME_CLAIM_NAME
The given name claim name.- See Also:
- Constant Field Values
-
FAMILY_NAME_CLAIM_NAME
public static final String FAMILY_NAME_CLAIM_NAME
The family name claim name.- See Also:
- Constant Field Values
-
MIDDLE_NAME_CLAIM_NAME
public static final String MIDDLE_NAME_CLAIM_NAME
The middle name claim name.- See Also:
- Constant Field Values
-
NICKNAME_CLAIM_NAME
public static final String NICKNAME_CLAIM_NAME
The nickname claim name.- See Also:
- Constant Field Values
-
PREFERRED_USERNAME_CLAIM_NAME
public static final String PREFERRED_USERNAME_CLAIM_NAME
The preferred username claim name.- See Also:
- Constant Field Values
-
PROFILE_CLAIM_NAME
public static final String PROFILE_CLAIM_NAME
The profile claim name.- See Also:
- Constant Field Values
-
PICTURE_CLAIM_NAME
public static final String PICTURE_CLAIM_NAME
The picture claim name.- See Also:
- Constant Field Values
-
WEBSITE_CLAIM_NAME
public static final String WEBSITE_CLAIM_NAME
The website claim name.- See Also:
- Constant Field Values
-
EMAIL_CLAIM_NAME
public static final String EMAIL_CLAIM_NAME
The email claim name.- See Also:
- Constant Field Values
-
EMAIL_VERIFIED_CLAIM_NAME
public static final String EMAIL_VERIFIED_CLAIM_NAME
The email verified claim name.- See Also:
- Constant Field Values
-
GENDER_CLAIM_NAME
public static final String GENDER_CLAIM_NAME
The gender claim name.- See Also:
- Constant Field Values
-
BIRTHDATE_CLAIM_NAME
public static final String BIRTHDATE_CLAIM_NAME
The birth date claim name.- See Also:
- Constant Field Values
-
ZONEINFO_CLAIM_NAME
public static final String ZONEINFO_CLAIM_NAME
The zoneinfo claim name.- See Also:
- Constant Field Values
-
LOCALE_CLAIM_NAME
public static final String LOCALE_CLAIM_NAME
The locale claim name.- See Also:
- Constant Field Values
-
PHONE_NUMBER_CLAIM_NAME
public static final String PHONE_NUMBER_CLAIM_NAME
The phone number claim name.- See Also:
- Constant Field Values
-
PHONE_NUMBER_VERIFIED_CLAIM_NAME
public static final String PHONE_NUMBER_VERIFIED_CLAIM_NAME
The phone number verified claim name.- See Also:
- Constant Field Values
-
ADDRESS_CLAIM_NAME
public static final String ADDRESS_CLAIM_NAME
The address claim name.- See Also:
- Constant Field Values
-
UPDATED_AT_CLAIM_NAME
public static final String UPDATED_AT_CLAIM_NAME
The updated at claim name.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UserInfo
public UserInfo(Subject sub)
Creates a new minimal UserInfo claims set.- Parameters:
sub- The subject. Must not benull.
-
UserInfo
public UserInfo(net.minidev.json.JSONObject jsonObject)
Creates a new UserInfo claims set from the specified JSON object.- Parameters:
jsonObject- The JSON object. Must not benull.- Throws:
IllegalArgumentException- If the JSON object doesn't contain a subjectsubstring claim.
-
UserInfo
public UserInfo(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet)
Creates a new UserInfo claims set from the specified JSON Web Token (JWT) claims set.- Parameters:
jwtClaimsSet- The JWT claims set. Must not benull.- Throws:
IllegalArgumentException- If the JWT claims set doesn't contain a subjectsubstring claim.
-
-
Method Detail
-
getStandardClaimNames
public static Set<String> getStandardClaimNames()
Gets the names of the standard top-level UserInfo claims.- Returns:
- The names of the standard top-level UserInfo claims (read-only set).
-
putAll
public void putAll(UserInfo other)
Puts all claims from the specified other UserInfo claims set. Aggregated and distributed claims are properly merged.- Parameters:
other- The other UserInfo. Must have the samesubject. Must not benull.- Throws:
IllegalArgumentException- If the other UserInfo claims set doesn't have an identical subject, or if the external claims source ID of the other UserInfo matches an existing source ID.
-
getSubject
public Subject getSubject()
Gets the UserInfo subject. Corresponds to thesubclaim.- Returns:
- The subject.
-
getIssuer
public Issuer getIssuer()
Gets the issuer. Corresponds to theissclaim.- Returns:
- The issuer,
nullif not specified.
-
setIssuer
public void setIssuer(Issuer iss)
Sets the issuer. Corresponds to theissclaim.- Parameters:
iss- The issuer,nullif not specified.
-
getAudience
public List<Audience> getAudience()
Gets the audience. Corresponds to theaudclaim.- Returns:
- The audience list,
nullif not specified.
-
setAudience
public void setAudience(Audience aud)
Sets the audience. Corresponds to theaudclaim.- Parameters:
aud- The audience,nullif not specified.
-
setAudience
public void setAudience(List<Audience> audList)
Sets the audience list. Corresponds to theaudclaim.- Parameters:
audList- The audience list,nullif not specified.
-
getName
public String getName()
Gets the full name. Corresponds to thenameclaim, with no language tag.- Returns:
- The full name,
nullif not specified.
-
getName
public String getName(com.nimbusds.langtag.LangTag langTag)
Gets the full name. Corresponds to thenameclaim, with an optional language tag.- Parameters:
langTag- The language tag of the entry,nullto get the non-tagged entry.- Returns:
- The full name,
nullif not specified.
-
getNameEntries
public Map<com.nimbusds.langtag.LangTag,String> getNameEntries()
Gets the full name entries. Correspond to thenameclaim.- Returns:
- The full name entries, empty map if none.
-
setName
public void setName(String name)
Sets the full name. Corresponds to thenameclaim, with no language tag.- Parameters:
name- The full name. Ifnullthe claim will be removed.
-
setName
public void setName(String name, com.nimbusds.langtag.LangTag langTag)
Sets the full name. Corresponds to thenameclaim, with an optional language tag.- Parameters:
name- The full name. Ifnullthe claim will be removed.langTag- The language tag,nullif not specified.
-
getGivenName
public String getGivenName()
Gets the given or first name. Corresponds to thegiven_nameclaim, with no language tag.- Returns:
- The given or first name,
nullif not specified.
-
getGivenName
public String getGivenName(com.nimbusds.langtag.LangTag langTag)
Gets the given or first name. Corresponds to thegiven_nameclaim, with an optional language tag.- Parameters:
langTag- The language tag of the entry,nullto get the non-tagged entry.- Returns:
- The given or first name,
nullif not specified.
-
getGivenNameEntries
public Map<com.nimbusds.langtag.LangTag,String> getGivenNameEntries()
Gets the given or first name entries. Correspond to thegiven_nameclaim.- Returns:
- The given or first name entries, empty map if none.
-
setGivenName
public void setGivenName(String givenName)
Sets the given or first name. Corresponds to thegiven_nameclaim, with no language tag.- Parameters:
givenName- The given or first name. Ifnullthe claim will be removed.
-
setGivenName
public void setGivenName(String givenName, com.nimbusds.langtag.LangTag langTag)
Sets the given or first name. Corresponds to thegiven_nameclaim, with an optional language tag.- Parameters:
givenName- The given or first full name. Ifnullthe claim will be removed.langTag- The language tag,nullif not specified.
-
getFamilyName
public String getFamilyName()
Gets the surname or last name. Corresponds to thefamily_nameclaim, with no language tag.- Returns:
- The surname or last name,
nullif not specified.
-
getFamilyName
public String getFamilyName(com.nimbusds.langtag.LangTag langTag)
Gets the surname or last name. Corresponds to thefamily_nameclaim, with an optional language tag.- Parameters:
langTag- The language tag of the entry,nullto get the non-tagged entry.- Returns:
- The surname or last name,
nullif not specified.
-
getFamilyNameEntries
public Map<com.nimbusds.langtag.LangTag,String> getFamilyNameEntries()
Gets the surname or last name entries. Correspond to thefamily_nameclaim.- Returns:
- The surname or last name entries, empty map if none.
-
setFamilyName
public void setFamilyName(String familyName)
Sets the surname or last name. Corresponds to thefamily_nameclaim, with no language tag.- Parameters:
familyName- The surname or last name. Ifnullthe claim will be removed.
-
setFamilyName
public void setFamilyName(String familyName, com.nimbusds.langtag.LangTag langTag)
Sets the surname or last name. Corresponds to thefamily_nameclaim, with an optional language tag.- Parameters:
familyName- The surname or last name. Ifnullthe claim will be removed.langTag- The language tag,nullif not specified.
-
getMiddleName
public String getMiddleName()
Gets the middle name. Corresponds to themiddle_nameclaim, with no language tag.- Returns:
- The middle name,
nullif not specified.
-
getMiddleName
public String getMiddleName(com.nimbusds.langtag.LangTag langTag)
Gets the middle name. Corresponds to themiddle_nameclaim, with an optional language tag.- Parameters:
langTag- The language tag of the entry,nullto get the non-tagged entry.- Returns:
- The middle name,
nullif not specified.
-
getMiddleNameEntries
public Map<com.nimbusds.langtag.LangTag,String> getMiddleNameEntries()
Gets the middle name entries. Correspond to themiddle_nameclaim.- Returns:
- The middle name entries, empty map if none.
-
setMiddleName
public void setMiddleName(String middleName)
Sets the middle name. Corresponds to themiddle_nameclaim, with no language tag.- Parameters:
middleName- The middle name. Ifnullthe claim will be removed.
-
setMiddleName
public void setMiddleName(String middleName, com.nimbusds.langtag.LangTag langTag)
Sets the middle name. Corresponds to themiddle_nameclaim, with an optional language tag.- Parameters:
middleName- The middle name. Ifnullthe claim will be removed.langTag- The language tag,nullif not specified.
-
getNickname
public String getNickname()
Gets the casual name. Corresponds to thenicknameclaim, with no language tag.- Returns:
- The casual name,
nullif not specified.
-
getNickname
public String getNickname(com.nimbusds.langtag.LangTag langTag)
Gets the casual name. Corresponds to thenicknameclaim, with an optional language tag.- Parameters:
langTag- The language tag of the entry,nullto get the non-tagged entry.- Returns:
- The casual name,
nullif not specified.
-
getNicknameEntries
public Map<com.nimbusds.langtag.LangTag,String> getNicknameEntries()
Gets the casual name entries. Correspond to thenicknameclaim.- Returns:
- The casual name entries, empty map if none.
-
setNickname
public void setNickname(String nickname)
Sets the casual name. Corresponds to thenicknameclaim, with no language tag.- Parameters:
nickname- The casual name. Ifnullthe claim will be removed.
-
setNickname
public void setNickname(String nickname, com.nimbusds.langtag.LangTag langTag)
Sets the casual name. Corresponds to thenicknameclaim, with an optional language tag.- Parameters:
nickname- The casual name. Ifnullthe claim will be removed.langTag- The language tag,nullif not specified.
-
getPreferredUsername
public String getPreferredUsername()
Gets the preferred username. Corresponds to thepreferred_usernameclaim.- Returns:
- The preferred username,
nullif not specified.
-
setPreferredUsername
public void setPreferredUsername(String preferredUsername)
Sets the preferred username. Corresponds to thepreferred_usernameclaim.- Parameters:
preferredUsername- The preferred username. Ifnullthe claim will be removed.
-
getProfile
public URI getProfile()
Gets the profile page. Corresponds to theprofileclaim.- Returns:
- The profile page URI,
nullif not specified.
-
setProfile
public void setProfile(URI profile)
Sets the profile page. Corresponds to theprofileclaim.- Parameters:
profile- The profile page URI. Ifnullthe claim will be removed.
-
getPicture
public URI getPicture()
Gets the picture. Corresponds to thepictureclaim.- Returns:
- The picture URI,
nullif not specified.
-
setPicture
public void setPicture(URI picture)
Sets the picture. Corresponds to thepictureclaim.- Parameters:
picture- The picture URI. Ifnullthe claim will be removed.
-
getWebsite
public URI getWebsite()
Gets the web page or blog. Corresponds to thewebsiteclaim.- Returns:
- The web page or blog URI,
nullif not specified.
-
setWebsite
public void setWebsite(URI website)
Sets the web page or blog. Corresponds to thewebsiteclaim.- Parameters:
website- The web page or blog URI. Ifnullthe claim will be removed.
-
getEmail
@Deprecated public javax.mail.internet.InternetAddress getEmail()
Deprecated.Gets the preferred email address. Corresponds to theemailclaim.Use
getEmailAddress()instead.- Returns:
- The preferred email address,
nullif not specified.
-
setEmail
@Deprecated public void setEmail(javax.mail.internet.InternetAddress email)
Deprecated.Sets the preferred email address. Corresponds to theemailclaim.Use
setEmailAddress(String)instead.- Parameters:
email- The preferred email address. Ifnullthe claim will be removed.
-
getEmailAddress
public String getEmailAddress()
Gets the preferred email address. Corresponds to theemailclaim.- Returns:
- The preferred email address,
nullif not specified.
-
setEmailAddress
public void setEmailAddress(String email)
Sets the preferred email address. Corresponds to theemailclaim.- Parameters:
email- The preferred email address. Ifnullthe claim will be removed.
-
getEmailVerified
public Boolean getEmailVerified()
Gets the email verification status. Corresponds to theemail_verifiedclaim.- Returns:
- The email verification status,
nullif not specified.
-
setEmailVerified
public void setEmailVerified(Boolean emailVerified)
Sets the email verification status. Corresponds to theemail_verifiedclaim.- Parameters:
emailVerified- The email verification status. Ifnullthe claim will be removed.
-
getGender
public Gender getGender()
Gets the gender. Corresponds to thegenderclaim.- Returns:
- The gender,
nullif not specified.
-
setGender
public void setGender(Gender gender)
Sets the gender. Corresponds to thegenderclaim.- Parameters:
gender- The gender. Ifnullthe claim will be removed.
-
getBirthdate
public String getBirthdate()
Gets the date of birth. Corresponds to thebirthdateclaim.- Returns:
- The date of birth,
nullif not specified.
-
setBirthdate
public void setBirthdate(String birthdate)
Sets the date of birth. Corresponds to thebirthdateclaim.- Parameters:
birthdate- The date of birth. Ifnullthe claim will be removed.
-
getZoneinfo
public String getZoneinfo()
Gets the zoneinfo. Corresponds to thezoneinfoclaim.- Returns:
- The zoneinfo,
nullif not specified.
-
setZoneinfo
public void setZoneinfo(String zoneinfo)
Sets the zoneinfo. Corresponds to thezoneinfoclaim.- Parameters:
zoneinfo- The zoneinfo. Ifnullthe claim will be removed.
-
getLocale
public String getLocale()
Gets the locale. Corresponds to thelocaleclaim.- Returns:
- The locale,
nullif not specified.
-
setLocale
public void setLocale(String locale)
Sets the locale. Corresponds to thelocaleclaim.- Parameters:
locale- The locale. Ifnullthe claim will be removed.
-
getPhoneNumber
public String getPhoneNumber()
Gets the preferred telephone number. Corresponds to thephone_numberclaim.- Returns:
- The preferred telephone number,
nullif not specified.
-
setPhoneNumber
public void setPhoneNumber(String phoneNumber)
Sets the preferred telephone number. Corresponds to thephone_numberclaim.- Parameters:
phoneNumber- The preferred telephone number. Ifnullthe claim will be removed.
-
getPhoneNumberVerified
public Boolean getPhoneNumberVerified()
Gets the phone number verification status. Corresponds to thephone_number_verifiedclaim.- Returns:
- The phone number verification status,
nullif not specified.
-
setPhoneNumberVerified
public void setPhoneNumberVerified(Boolean phoneNumberVerified)
Sets the email verification status. Corresponds to thephone_number_verifiedclaim.- Parameters:
phoneNumberVerified- The phone number verification status. Ifnullthe claim will be removed.
-
getAddress
public Address getAddress()
Gets the preferred address. Corresponds to theaddressclaim, with no language tag.- Returns:
- The preferred address,
nullif not specified.
-
getAddress
public Address getAddress(com.nimbusds.langtag.LangTag langTag)
Gets the preferred address. Corresponds to theaddressclaim, with an optional language tag.- Parameters:
langTag- The language tag of the entry,nullto get the non-tagged entry.- Returns:
- The preferred address,
nullif not specified.
-
getAddressEntries
public Map<com.nimbusds.langtag.LangTag,Address> getAddressEntries()
Gets the preferred address entries. Correspond to theaddressclaim.- Returns:
- The preferred address entries, empty map if none.
-
setAddress
public void setAddress(Address address)
Sets the preferred address. Corresponds to theaddressclaim, with no language tag.- Parameters:
address- The preferred address. Ifnullthe claim will be removed.
-
setAddress
public void setAddress(Address address, com.nimbusds.langtag.LangTag langTag)
Sets the preferred address. Corresponds to theaddressclaim, with an optional language tag.- Parameters:
address- The preferred address. Ifnullthe claim will be removed.langTag- The language tag,nullif not specified.
-
getUpdatedTime
public Date getUpdatedTime()
Gets the time the end-user information was last updated. Corresponds to theupdated_atclaim.- Returns:
- The time the end-user information was last updated,
nullif not specified.
-
setUpdatedTime
public void setUpdatedTime(Date updatedTime)
Sets the time the end-user information was last updated. Corresponds to theupdated_atclaim.- Parameters:
updatedTime- The time the end-user information was last updated. Ifnullthe claim will be removed.
-
addAggregatedClaims
public void addAggregatedClaims(AggregatedClaims aggregatedClaims)
Adds the specified aggregated claims provided by an external claims source.- Parameters:
aggregatedClaims- The aggregated claims instance, ifnullnothing will be added.
-
getAggregatedClaims
public Set<AggregatedClaims> getAggregatedClaims()
Gets the included aggregated claims provided by each external claims source.- Returns:
- The aggregated claims,
nullif none are found.
-
addDistributedClaims
public void addDistributedClaims(DistributedClaims distributedClaims)
Adds the specified distributed claims from an external claims source.- Parameters:
distributedClaims- The distributed claims instance, ifnullnothing will be added.
-
getDistributedClaims
public Set<DistributedClaims> getDistributedClaims()
Gets the included distributed claims provided by each external claims source.- Returns:
- The distributed claims,
nullif none are found.
-
parse
public static UserInfo parse(String json) throws ParseException
Parses a UserInfo claims set from the specified JSON object string.- Parameters:
json- The JSON object string to parse. Must not benull.- Returns:
- The UserInfo claims set.
- Throws:
ParseException- If parsing failed.
-
-