Class Address
- java.lang.Object
-
- com.nimbusds.openid.connect.sdk.claims.ClaimsSet
-
- com.nimbusds.openid.connect.sdk.claims.Address
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOUNTRY_CLAIM_NAMEThe country claim name.static StringCOUNTRY_CODE_CLAIM_NAMEThe country code claim name.static StringFORMATTED_CLAIM_NAMEThe formatted claim name.static StringLOCALITY_CLAIM_NAMEThe locality claim name.static StringPOSTAL_CODE_CLAIM_NAMEThe postal code claim name.static StringREGION_CLAIM_NAMEThe region claim name.static StringSTREET_ADDRESS_CLAIM_NAMEThe street address claim name.-
Fields inherited from class com.nimbusds.openid.connect.sdk.claims.ClaimsSet
AUD_CLAIM_NAME, claims, ISS_CLAIM_NAME
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCountry()Gets the country name component.CountryCodegetCountryCode()Gets the country code component.StringgetFormatted()Gets the full mailing address, formatted for display or use with a mailing label.StringgetLocality()Gets the city or locality component.StringgetPostalCode()Gets the zip code or postal code component.StringgetRegion()Gets the state, province, prefecture or region component.static Set<String>getStandardClaimNames()Gets the names of the standard UserInfo address claims.StringgetStreetAddress()Gets the full street address component, which may include house number, street name, PO BOX, and multi-line extended street address information.static Addressparse(String json)Parses 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.voidsetRegion(String region)Sets 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, getJSONObjectClaim, getLangTaggedClaim, getNumberClaim, getStringClaim, getStringClaim, getStringListClaim, getURIClaim, getURLClaim, hashCode, putAll, putAll, setAudience, setAudience, setClaim, setClaim, setDateClaim, setIssuer, setURIClaim, setURLClaim, toJSONObject, toJSONString, toJWTClaimsSet
-
-
-
-
Field Detail
-
FORMATTED_CLAIM_NAME
public static final String FORMATTED_CLAIM_NAME
The formatted claim name.- See Also:
- Constant Field Values
-
STREET_ADDRESS_CLAIM_NAME
public static final String STREET_ADDRESS_CLAIM_NAME
The street address claim name.- See Also:
- Constant Field Values
-
LOCALITY_CLAIM_NAME
public static final String LOCALITY_CLAIM_NAME
The locality claim name.- See Also:
- Constant Field Values
-
REGION_CLAIM_NAME
public static final String REGION_CLAIM_NAME
The region claim name.- See Also:
- Constant Field Values
-
POSTAL_CODE_CLAIM_NAME
public static final String POSTAL_CODE_CLAIM_NAME
The postal code claim name.- See Also:
- Constant Field Values
-
COUNTRY_CLAIM_NAME
public static final String COUNTRY_CLAIM_NAME
The country claim name.- See Also:
- Constant Field Values
-
COUNTRY_CODE_CLAIM_NAME
public static final String COUNTRY_CODE_CLAIM_NAME
The country code claim name.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Address
public Address()
Creates a new minimal (empty) UserInfo address claims set.
-
Address
public Address(net.minidev.json.JSONObject jsonObject)
Creates a new UserInfo address claims set from the specified JSON object.- Parameters:
jsonObject- The JSON object. Must not benull.
-
-
Method Detail
-
getStandardClaimNames
public static Set<String> getStandardClaimNames()
Gets the names of the standard UserInfo address claims.- Returns:
- The names of the standard UserInfo address claims (read-only set).
-
setFormatted
public void setFormatted(String formatted)
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
public String 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
public 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. May contain newlines. Corresponds to thestreet_addressclaim.- Parameters:
streetAddress- The full street address component. Ifnullthe claim will be removed.
-
getStreetAddress
public String 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
public void setLocality(String locality)
Sets the city or locality component. Corresponds to thelocalityclaim.- Parameters:
locality- The city or locality component. Ifnullthe claim will be removed.
-
getLocality
public String getLocality()
Gets the city or locality component. Corresponds to thelocalityclaim, with no language tag.- Returns:
- The city or locality component,
nullif not specified.
-
setRegion
public void setRegion(String region)
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
public String getRegion()
Gets the state, province, prefecture or region component. Corresponds to theregionclaim.- Returns:
- The state, province, prefecture or region component,
nullif not specified.
-
setPostalCode
public void setPostalCode(String postalCode)
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
public String 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
public void setCountry(String country)
Sets the country name component. Corresponds to thecountryclaim.- Parameters:
country- The country name component. Ifnullthe claim will be removed.
-
getCountry
public String getCountry()
Gets the country name component. Corresponds to thecountryclaim.- Returns:
- The country name component,
nullif not specified.
-
setCountryCode
public void setCountryCode(CountryCode countryCode)
Sets the country code component. Corresponds to thecountry_codeclaim.- Parameters:
countryCode- The country code component. Ifnullthe claim will be removed.
-
getCountryCode
public CountryCode getCountryCode()
Gets the country code component. Corresponds to thecountry_codeclaim.- Returns:
- The country code component,
nullif not specified.
-
parse
public static Address parse(String json) throws ParseException
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.
-
-