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 String
COUNTRY_CLAIM_NAME
The country claim name.static String
FORMATTED_CLAIM_NAME
The formatted claim name.static String
LOCALITY_CLAIM_NAME
The locality claim name.static String
POSTAL_CODE_CLAIM_NAME
The postal code claim name.static String
REGION_CLAIM_NAME
The region claim name.static String
STREET_ADDRESS_CLAIM_NAME
The 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 String
getCountry()
Gets the country name component.String
getFormatted()
Gets the full mailing address, formatted for display or use with a mailing label.String
getLocality()
Gets the city or locality component.String
getPostalCode()
Gets the zip code or postal code component.String
getRegion()
Gets the state, province, prefecture or region component.static Set<String>
getStandardClaimNames()
Gets the names of the standard UserInfo address claims.String
getStreetAddress()
Gets the full street address component, which may include house number, street name, PO BOX, and multi-line extended street address information.static Address
parse(String json)
Parses an address claims set from the specified JSON object string.void
setCountry(String country)
Sets the country name 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
setRegion(String region)
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
getAudience, getBooleanClaim, getClaim, getClaim, getDateClaim, getIssuer, getJSONObjectClaim, getLangTaggedClaim, getNumberClaim, getStringClaim, getStringClaim, getStringListClaim, getURIClaim, getURLClaim, 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
-
-
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 theformatted
claim.- Parameters:
formatted
- The full mailing address.null
if 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 theformatted
claim.- Returns:
- The full mailing address,
null
if 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_address
claim.- Parameters:
streetAddress
- The full street address component. Ifnull
the 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_address
claim.- Returns:
- The full street address component,
null
if not specified.
-
setLocality
public void setLocality(String locality)
Sets the city or locality component. Corresponds to thelocality
claim.- Parameters:
locality
- The city or locality component. Ifnull
the claim will be removed.
-
getLocality
public String 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
public void setRegion(String region)
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
public String 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
public void setPostalCode(String postalCode)
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
public String 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
public void setCountry(String country)
Sets the country name component. Corresponds to thecountry
claim.- Parameters:
country
- The country name component. Ifnull
the claim will be removed.
-
getCountry
public String getCountry()
Gets the country name component. Corresponds to thecountry
claim.- Returns:
- The country name component,
null
if 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.
-
-