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 String
The country claim name.static final String
The country code claim name.static final String
The formatted claim name.static final String
The locality claim name.static final String
The postal code claim name.static final String
The region claim name.static final String
The 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 Address
Parses an address claims set from the specified JSON object string.void
setCountry
(String country) Sets the country name component.void
setCountryCode
(CountryCode countryCode) Sets the country code component.void
setFormatted
(String formatted) Sets the full mailing address, formatted for display or use with a mailing label.void
setLocality
(String locality) Sets the city or locality component.void
setPostalCode
(String postalCode) Sets the zip code or postal code component.void
Sets the state, province, prefecture or region component.void
setStreetAddress
(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 theformatted
claim.- Parameters:
formatted
- The full mailing address.null
if not specified.
-
getFormatted
Gets the full mailing address, formatted for display or use with a mailing label. May contain newlines. Corresponds to theformatted
claim.- Returns:
- The full mailing address,
null
if 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_address
claim.- Parameters:
streetAddress
- The full street address component. Ifnull
the 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_address
claim.- Returns:
- The full street address component,
null
if not specified.
-
setLocality
Sets the city or locality component. Corresponds to thelocality
claim.- Parameters:
locality
- The city or locality component. Ifnull
the claim will be removed.
-
getLocality
Gets the city or locality component. Corresponds to thelocality
claim, with no language tag.- Returns:
- The city or locality component,
null
if not specified.
-
setRegion
Sets the state, province, prefecture or region component. Corresponds to theregion
claim.- Parameters:
region
- The state, province, prefecture or region component. Ifnull
the claim will be removed.
-
getRegion
Gets the state, province, prefecture or region component. Corresponds to theregion
claim.- Returns:
- The state, province, prefecture or region component,
null
if not specified.
-
setPostalCode
Sets the zip code or postal code component. Corresponds to thepostal_code
claim.- Parameters:
postalCode
- The zip code or postal code component. Ifnull
the claim will be removed.
-
getPostalCode
Gets the zip code or postal code component. Corresponds to thepostal_code
claim.- Returns:
- The zip code or postal code component,
null
if not specified.
-
setCountry
Sets the country name component. Corresponds to thecountry
claim.- Parameters:
country
- The country name component. Ifnull
the claim will be removed.
-
getCountry
Gets the country name component. Corresponds to thecountry
claim.- Returns:
- The country name component,
null
if not specified.
-
setCountryCode
Sets the country code component. Corresponds to thecountry_code
claim.- Parameters:
countryCode
- The country code component. Ifnull
the claim will be removed.
-
getCountryCode
Gets the country code component. Corresponds to thecountry_code
claim.- Returns:
- The country code component,
null
if 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.
-