Class DefaultEntityStatementRetriever
java.lang.Object
com.nimbusds.openid.connect.sdk.federation.trust.DefaultEntityStatementRetriever
- All Implemented Interfaces:
EntityStatementRetriever
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The default HTTP connect timeout in milliseconds.static final int
The default HTTP read timeout in milliseconds. -
Constructor Summary
ConstructorDescriptionCreates a new entity statement retriever using the default HTTP timeout settings.DefaultEntityStatementRetriever
(int httpConnectTimeoutMs, int httpReadTimeoutMs) Creates a new entity statement retriever.DefaultEntityStatementRetriever
(HTTPRequestSender httpRequestSender) Creates a new entity statement retriever. -
Method Summary
Modifier and TypeMethodDescriptionfetchEntityConfiguration
(EntityID target) Fetches an entity configuration.fetchEntityStatement
(URI federationAPIEndpoint, EntityID issuer, EntityID subject) Fetches an entity statement.int
Returns the configured HTTP connect timeout.int
Returns the configured HTTP read timeout.Returns the running list of the recorded HTTP requests.
-
Field Details
-
DEFAULT_HTTP_CONNECT_TIMEOUT_MS
The default HTTP connect timeout in milliseconds.- See Also:
-
DEFAULT_HTTP_READ_TIMEOUT_MS
The default HTTP read timeout in milliseconds.- See Also:
-
-
Constructor Details
-
DefaultEntityStatementRetriever
public DefaultEntityStatementRetriever()Creates a new entity statement retriever using the default HTTP timeout settings. -
DefaultEntityStatementRetriever
Creates a new entity statement retriever.- Parameters:
httpConnectTimeoutMs
- The HTTP connect timeout in milliseconds, zero means timeout determined by the underlying HTTP client.httpReadTimeoutMs
- The HTTP read timeout in milliseconds, zero means timeout determined by the underlying HTTP client.
-
DefaultEntityStatementRetriever
Creates a new entity statement retriever.- Parameters:
httpRequestSender
- The HTTP request sender to use. Must not benull
.
-
-
Method Details
-
getHTTPConnectTimeout
Returns the configured HTTP connect timeout.- Returns:
- The configured HTTP connect timeout in milliseconds, zero means timeout determined by the underlying HTTP client.
-
getHTTPReadTimeout
Returns the configured HTTP read timeout.- Returns:
- The configured HTTP read timeout in milliseconds, zero means timeout determined by the underlying HTTP client.
-
fetchEntityConfiguration
Description copied from interface:EntityStatementRetriever
Fetches an entity configuration.- Specified by:
fetchEntityConfiguration
in interfaceEntityStatementRetriever
- Parameters:
target
- The entity ID. Must not benull
.- Returns:
- The entity statement.
- Throws:
ResolveException
- If fetching failed.
-
fetchEntityStatement
public EntityStatement fetchEntityStatement(URI federationAPIEndpoint, EntityID issuer, EntityID subject) throws ResolveException Description copied from interface:EntityStatementRetriever
Fetches an entity statement.- Specified by:
fetchEntityStatement
in interfaceEntityStatementRetriever
- Parameters:
federationAPIEndpoint
- The federation API endpoint. Must not benull
.issuer
- The entity statement issuer, typically the ID of the entity operating the endpoint. Must not benull
.subject
- The entity statement subject. Must not benull
.- Returns:
- The entity statement.
- Throws:
ResolveException
- If fetching failed.
-
getRecordedRequests
Returns the running list of the recorded HTTP requests.- Returns:
- The HTTP request URIs (with query parameters), empty if none.
-