Class HTTPProviderConfigurationFetchingStrategy
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
-
- net.shibboleth.oidc.metadata.impl.AbstractDynamicHTTPFetchingStrategy<com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata>
-
- net.shibboleth.oidc.metadata.impl.HTTPProviderConfigurationFetchingStrategy
-
- All Implemented Interfaces:
Function<CriteriaSet,com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata>,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
@ThreadSafe public class HTTPProviderConfigurationFetchingStrategy extends AbstractDynamicHTTPFetchingStrategy<com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata>
A dynamic strategy for fetching OpenID Connect Provider Configuration Metadata from its well-known location (OpenID Connect Discovery 1.0, section 4).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classHTTPProviderConfigurationFetchingStrategy.DefaultWellKnownPathCompositionStrategyDefault strategy for composing a well-known URL to fetch a provider's configuration document from.static classHTTPProviderConfigurationFetchingStrategy.OIDCProviderMetadataResponseHandlerThe response handler for parsing the providers's configuration information intoOIDCProviderMetadata.
-
Field Summary
Fields Modifier and Type Field Description private static MediaTypeCONTENT_TYPEThe returned content_type, must be application/json see openid-connect-discovery section 4.private static StringDEFAULT_OPENID_PROVIDER_WELL_KNOWN_PATHThe default well-known path for OpenID Provider metadata.private org.slf4j.LoggerlogClass logger.private BiFunction<com.nimbusds.oauth2.sdk.id.Issuer,String,String>wellKnownLocationCompositionStrategyStrategy for composing an issuer with the well-known configuration path.private StringwellKnownPathThe well-known path for OpenID Provider metadata.-
Fields inherited from class net.shibboleth.oidc.metadata.impl.AbstractDynamicHTTPFetchingStrategy
MDC_ATTRIB_CURRENT_REQUEST_URI
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHTTPProviderConfigurationFetchingStrategy(org.apache.http.client.HttpClient client, org.apache.http.client.ResponseHandler<com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata> handler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringbuildRequestURL(CriteriaSet criteria)Build the request URL based on the input criteria set.voidsetWellKnownLocationCompositionStrategy(BiFunction<com.nimbusds.oauth2.sdk.id.Issuer,String,String> strategy)Set the well-known location composition strategy.voidsetWellKnownPath(String path)Set the well-known URL path component.-
Methods inherited from class net.shibboleth.oidc.metadata.impl.AbstractDynamicHTTPFetchingStrategy
apply, doInitialize, getSupportedContentTypes, setHttpClientSecurityParameters, setSupportedContentTypes
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
-
-
-
-
Field Detail
-
CONTENT_TYPE
@Nonnull private static final MediaType CONTENT_TYPE
The returned content_type, must be application/json see openid-connect-discovery section 4.
-
DEFAULT_OPENID_PROVIDER_WELL_KNOWN_PATH
@Nonnull @NotEmpty private static final String DEFAULT_OPENID_PROVIDER_WELL_KNOWN_PATH
The default well-known path for OpenID Provider metadata.- See Also:
- Constant Field Values
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
wellKnownPath
@Nonnull @NotEmpty private String wellKnownPath
The well-known path for OpenID Provider metadata.
-
wellKnownLocationCompositionStrategy
@Nonnull private BiFunction<com.nimbusds.oauth2.sdk.id.Issuer,String,String> wellKnownLocationCompositionStrategy
Strategy for composing an issuer with the well-known configuration path.
-
-
Method Detail
-
setWellKnownPath
public void setWellKnownPath(@Nonnull @NotEmpty String path)
Set the well-known URL path component.Defaults to "/.well-known/openid-configuration".
- Parameters:
path- the path.
-
setWellKnownLocationCompositionStrategy
public void setWellKnownLocationCompositionStrategy(@Nonnull BiFunction<com.nimbusds.oauth2.sdk.id.Issuer,String,String> strategy)Set the well-known location composition strategy.- Parameters:
strategy- the strategy to set.
-
buildRequestURL
protected String buildRequestURL(@Nonnull CriteriaSet criteria)
Description copied from class:AbstractDynamicHTTPFetchingStrategyBuild the request URL based on the input criteria set.- Specified by:
buildRequestURLin classAbstractDynamicHTTPFetchingStrategy<com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata>- Parameters:
criteria- the input criteria set- Returns:
- the request URL, or null if it can not be built based on the supplied criteria
-
-