java.lang.Object
com.nimbusds.openid.connect.sdk.claims.ClaimsSet
com.nimbusds.openid.connect.sdk.claims.Address
All Implemented Interfaces:
net.minidev.json.JSONAware

public class Address extends ClaimsSet
UserInfo address claims set, serialisable to a JSON object.

Related specifications:

  • OpenID Connect Core 1.0
  • OpenID Connect for Identity Assurance 1.0
  • Field Details

  • Constructor Details

    • 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 be null.
  • Method Details

    • 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 the formatted 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 the formatted 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 the street_address claim.
      Parameters:
      streetAddress - The full street address component. If null 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 the street_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 the locality claim.
      Parameters:
      locality - The city or locality component. If null the claim will be removed.
    • getLocality

      public String getLocality()
      Gets the city or locality component. Corresponds to the locality 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 the region claim.
      Parameters:
      region - The state, province, prefecture or region component. If null the claim will be removed.
    • getRegion

      public String getRegion()
      Gets the state, province, prefecture or region component. Corresponds to the region 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 the postal_code claim.
      Parameters:
      postalCode - The zip code or postal code component. If null the claim will be removed.
    • getPostalCode

      Gets the zip code or postal code component. Corresponds to the postal_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 the country claim.
      Parameters:
      country - The country name component. If null the claim will be removed.
    • getCountry

      public String getCountry()
      Gets the country name component. Corresponds to the country claim.
      Returns:
      The country name component, null if not specified.
    • setCountryCode

      public void setCountryCode(CountryCode countryCode)
      Sets the country code component. Corresponds to the country_code claim.
      Parameters:
      countryCode - The country code component. If null the claim will be removed.
    • getCountryCode

      Gets the country code component. Corresponds to the country_code claim.
      Returns:
      The country code 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 be null.
      Returns:
      The address claims set.
      Throws:
      ParseException - If parsing failed.