Class Address
java.lang.Object
com.nimbusds.openid.connect.sdk.claims.ClaimsSet
com.nimbusds.openid.connect.sdk.claims.Address
- All Implemented Interfaces:
net.minidev.json.JSONAware
UserInfo address claims set, serialisable to a JSON object.
Related specifications:
- OpenID Connect Core 1.0
- OpenID Connect for Identity Assurance 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe country claim name.static final StringThe country code claim name.static final StringThe formatted claim name.static final StringThe locality claim name.static final StringThe postal code claim name.static final StringThe region claim name.static final StringThe street address claim name.Fields inherited from class com.nimbusds.openid.connect.sdk.claims.ClaimsSet
AUD_CLAIM_NAME, claims, ISS_CLAIM_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the country name component.Gets the country code component.Gets the full mailing address, formatted for display or use with a mailing label.Gets the city or locality component.Gets the zip code or postal code component.Gets the state, province, prefecture or region component.Gets the names of the standard UserInfo address claims.Gets the full street address component, which may include house number, street name, PO BOX, and multi-line extended street address information.static AddressParses an address claims set from the specified JSON object string.voidsetCountry(String country) Sets the country name component.voidsetCountryCode(CountryCode countryCode) Sets the country code component.voidsetFormatted(String formatted) Sets the full mailing address, formatted for display or use with a mailing label.voidsetLocality(String locality) Sets the city or locality component.voidsetPostalCode(String postalCode) Sets the zip code or postal code component.voidSets the state, province, prefecture or region component.voidsetStreetAddress(String streetAddress) Sets the full street address component, which may include house number, street name, PO BOX, and multi-line extended street address information.Methods inherited from class com.nimbusds.openid.connect.sdk.claims.ClaimsSet
equals, getAudience, getBooleanClaim, getClaim, getClaim, getDateClaim, getIssuer, getJSONArrayClaim, getJSONObjectClaim, getLangTaggedClaim, getNumberClaim, getStringClaim, getStringClaim, getStringListClaim, getURIClaim, getURLClaim, hashCode, putAll, putAll, setAudience, setAudience, setClaim, setClaim, setDateClaim, setIssuer, setURIClaim, setURLClaim, toJSONObject, toJSONString, toJWTClaimsSet, toString
-
Field Details
-
FORMATTED_CLAIM_NAME
The formatted claim name.- See Also:
-
STREET_ADDRESS_CLAIM_NAME
The street address claim name.- See Also:
-
LOCALITY_CLAIM_NAME
The locality claim name.- See Also:
-
REGION_CLAIM_NAME
The region claim name.- See Also:
-
POSTAL_CODE_CLAIM_NAME
The postal code claim name.- See Also:
-
COUNTRY_CLAIM_NAME
The country claim name.- See Also:
-
COUNTRY_CODE_CLAIM_NAME
The country code claim name.- See Also:
-
-
Constructor Details
-
Address
public Address()Creates a new minimal (empty) UserInfo address claims set. -
Address
Creates a new UserInfo address claims set from the specified JSON object.- Parameters:
jsonObject- The JSON object. Must not benull.
-
-
Method Details
-
getStandardClaimNames
Gets the names of the standard UserInfo address claims.- Returns:
- The names of the standard UserInfo address claims (read-only set).
-
setFormatted
Sets the full mailing address, formatted for display or use with a mailing label. May contain newlines. Corresponds to theformattedclaim.- Parameters:
formatted- The full mailing address.nullif not specified.
-
getFormatted
Gets the full mailing address, formatted for display or use with a mailing label. May contain newlines. Corresponds to theformattedclaim.- Returns:
- The full mailing address,
nullif not specified.
-
setStreetAddress
Sets the full street address component, which may include house number, street name, PO BOX, and multi-line extended street address information. May contain newlines. Corresponds to thestreet_addressclaim.- Parameters:
streetAddress- The full street address component. Ifnullthe claim will be removed.
-
getStreetAddress
Gets the full street address component, which may include house number, street name, PO BOX, and multi-line extended street address information. May contain newlines. Corresponds to thestreet_addressclaim.- Returns:
- The full street address component,
nullif not specified.
-
setLocality
Sets the city or locality component. Corresponds to thelocalityclaim.- Parameters:
locality- The city or locality component. Ifnullthe claim will be removed.
-
getLocality
Gets the city or locality component. Corresponds to thelocalityclaim, with no language tag.- Returns:
- The city or locality component,
nullif not specified.
-
setRegion
Sets the state, province, prefecture or region component. Corresponds to theregionclaim.- Parameters:
region- The state, province, prefecture or region component. Ifnullthe claim will be removed.
-
getRegion
Gets the state, province, prefecture or region component. Corresponds to theregionclaim.- Returns:
- The state, province, prefecture or region component,
nullif not specified.
-
setPostalCode
Sets the zip code or postal code component. Corresponds to thepostal_codeclaim.- Parameters:
postalCode- The zip code or postal code component. Ifnullthe claim will be removed.
-
getPostalCode
Gets the zip code or postal code component. Corresponds to thepostal_codeclaim.- Returns:
- The zip code or postal code component,
nullif not specified.
-
setCountry
Sets the country name component. Corresponds to thecountryclaim.- Parameters:
country- The country name component. Ifnullthe claim will be removed.
-
getCountry
Gets the country name component. Corresponds to thecountryclaim.- Returns:
- The country name component,
nullif not specified.
-
setCountryCode
Sets the country code component. Corresponds to thecountry_codeclaim.- Parameters:
countryCode- The country code component. Ifnullthe claim will be removed.
-
getCountryCode
Gets the country code component. Corresponds to thecountry_codeclaim.- Returns:
- The country code component,
nullif not specified.
-
parse
Parses an address claims set from the specified JSON object string.- Parameters:
json- The JSON object string to parse. Must not benull.- Returns:
- The address claims set.
- Throws:
ParseException- If parsing failed.
-