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 3.1.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOUNTRY_CLAIM_NAMEThe country claim name.static StringLOCALITY_CLAIM_NAMEThe locality claim name.static StringREGION_CLAIM_NAMEThe 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 country, 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 CountryCodegetCountry()Gets the country.StringgetLocality()Gets the city or other locality.StringgetRegion()Gets the tate, province, prefecture, or region component.static Set<String>getStandardClaimNames()Gets the names of the standard birthplace claims.voidsetCountry(CountryCode country)Sets the country.voidsetLocality(String locality)Sets the city or other locality.voidsetRegion(String region)Sets the tate, province, prefecture, or region component.-
Methods inherited from class com.nimbusds.openid.connect.sdk.claims.ClaimsSet
getAudience, getBooleanClaim, getClaim, getClaim, getDateClaim, getEmailClaim, getIssuer, getLangTaggedClaim, getNumberClaim, getStringClaim, getStringClaim, getStringListClaim, getURIClaim, getURLClaim, putAll, putAll, setAudience, setAudience, setClaim, setClaim, setDateClaim, setEmailClaim, setIssuer, setURIClaim, setURLClaim, toJSONObject, toJSONString, toJWTClaimsSet
-
-
-
-
Field Detail
-
COUNTRY_CLAIM_NAME
public static final String COUNTRY_CLAIM_NAME
The country 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 country, String region, String locality)
Creates a new birthplace claims set.- Parameters:
country- The country, as ISO3166-1 Alpha-2 or ISO3166-3 code,nullif not specified.region- State, province, prefecture, or region component,nullif not specified.locality- City or other locality,nullif 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.- Returns:
- The country,
nullif not specified or illegal ISO 3166-1 alpha-2 (two-letter) country code.
-
setCountry
public void setCountry(CountryCode country)
Sets the country.- Parameters:
country- The country,nullif not specified.
-
getRegion
public String getRegion()
Gets the tate, province, prefecture, or region component.- Returns:
- The state, province, prefecture, or region component,
nullif 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,nullif not specified.
-
getLocality
public String getLocality()
Gets the city or other locality.- Returns:
- The city or other locality,
nullif not specified.
-
setLocality
public void setLocality(String locality)
Sets the city or other locality.- Parameters:
locality- The city or other locality,nullif not specified.
-
-