Class Birthplace
- java.lang.Object
-
- com.nimbusds.openid.connect.sdk.claims.ClaimsSet
-
- com.nimbusds.openid.connect.sdk.assurance.claims.Birthplace
-
- All Implemented Interfaces:
net.minidev.json.JSONAware
public final class Birthplace extends ClaimsSet
Birthplace claims set, serialisable to a JSON object.Related specifications:
- OpenID Connect for Identity Assurance 1.0, section 4.1.
-
-
Field Summary
Fields Modifier and Type Field Description static String
COUNTRY_CLAIM_NAME
The country code claim name.static String
LOCALITY_CLAIM_NAME
The locality claim name.static String
REGION_CLAIM_NAME
The region claim name.-
Fields inherited from class com.nimbusds.openid.connect.sdk.claims.ClaimsSet
AUD_CLAIM_NAME, claims, ISS_CLAIM_NAME
-
-
Constructor Summary
Constructors Constructor Description Birthplace(CountryCode countryCode, String region, String locality)
Creates a new birthplace claims set.Birthplace(net.minidev.json.JSONObject jsonObject)
Creates a new birthplace claims set from the specified JSON object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CountryCode
getCountry()
Gets the country code.String
getLocality()
Gets the city or other locality.String
getRegion()
Gets the tate, province, prefecture, or region component.static Set<String>
getStandardClaimNames()
Gets the names of the standard birthplace claims.void
setCountry(CountryCode country)
Sets the country.void
setLocality(String locality)
Sets the city or other locality.void
setRegion(String region)
Sets the tate, province, prefecture, or region component.-
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
-
COUNTRY_CLAIM_NAME
public static final String COUNTRY_CLAIM_NAME
The country code 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
-
LOCALITY_CLAIM_NAME
public static final String LOCALITY_CLAIM_NAME
The locality claim name.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Birthplace
public Birthplace(CountryCode countryCode, String region, String locality)
Creates a new birthplace claims set.- Parameters:
countryCode
- The country code, as ISO3166-1 or ISO3166-3 code,null
if not specified.region
- State, province, prefecture, or region component,null
if not specified.locality
- City or other locality,null
if not specified.
-
Birthplace
public Birthplace(net.minidev.json.JSONObject jsonObject)
Creates a new birthplace 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 birthplace claims.- Returns:
- The names of the standard birthplace claims (read-only set).
-
getCountry
public CountryCode getCountry()
Gets the country code.- Returns:
- The country code,
null
if not specified or illegal ISO3166-1 or ISO3166-3 country code.
-
setCountry
public void setCountry(CountryCode country)
Sets the country.- Parameters:
country
- The country,null
if not specified.
-
getRegion
public String getRegion()
Gets the tate, province, prefecture, or region component.- Returns:
- The state, province, prefecture, or region component,
null
if not specified.
-
setRegion
public void setRegion(String region)
Sets the tate, province, prefecture, or region component.- Parameters:
region
- The state, province, prefecture, or region component,null
if not specified.
-
getLocality
public String getLocality()
Gets the city or other locality.- Returns:
- The city or other locality,
null
if not specified.
-
setLocality
public void setLocality(String locality)
Sets the city or other locality.- Parameters:
locality
- The city or other locality,null
if not specified.
-
-