Class SectorID
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.id.Identifier
-
- com.nimbusds.openid.connect.sdk.id.SectorID
-
- All Implemented Interfaces:
Serializable
,Comparable<Identifier>
,net.minidev.json.JSONAware
@Immutable public final class SectorID extends Identifier
Sector identifier.Related specifications:
- OpenID Connect Core 1.0, section 8.1.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.nimbusds.oauth2.sdk.id.Identifier
DEFAULT_BYTE_LENGTH, secureRandom
-
-
Constructor Summary
Constructors Constructor Description SectorID(Audience audience)
Creates a new sector identifier based on an audience.SectorID(Identifier identifier)
Creates a new sector identifier based on a generic identifier.SectorID(String host)
Creates a new sector identifier based on a internet host.SectorID(URI uri)
Creates a new sector identifier based on the host component of an URI.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
ensureHostComponent(URI sectorURI)
Ensures the URI contains a host component.static void
ensureHTTPScheme(URI sectorURI)
Ensures the URI has ahttps
scheme.-
Methods inherited from class com.nimbusds.oauth2.sdk.id.Identifier
compareTo, equals, getValue, hashCode, toJSONString, toString, toStringList
-
-
-
-
Constructor Detail
-
SectorID
public SectorID(String host)
Creates a new sector identifier based on a internet host.Example host: client.example.com
- Parameters:
host
- The host. The value is not validated. Must not be empty ornull
.
-
SectorID
public SectorID(URI uri)
Creates a new sector identifier based on the host component of an URI.Example URI: https://client.example.com
- Parameters:
uri
- The URI. Must contain a host component and must not benull
.
-
SectorID
public SectorID(Audience audience)
Creates a new sector identifier based on an audience.- Parameters:
audience
- The audience. Must not be empty ornull
.
-
SectorID
public SectorID(Identifier identifier)
Creates a new sector identifier based on a generic identifier.- Parameters:
identifier
- The identifier. Must not be empty ornull
.
-
-
Method Detail
-
ensureHTTPScheme
public static void ensureHTTPScheme(URI sectorURI)
Ensures the URI has ahttps
scheme.- Parameters:
sectorURI
- The URI. Must have ahttps
scheme and not benull
.
-
ensureHostComponent
public static String ensureHostComponent(URI sectorURI)
Ensures the URI contains a host component.- Parameters:
sectorURI
- The URI. Must contain a host component and not benull
.- Returns:
- The host component.
-
-