Class HTTPMetadataProvidersParserSupport
- java.lang.Object
-
- net.shibboleth.idp.profile.spring.relyingparty.metadata.impl.HTTPMetadataProvidersParserSupport
-
public final class HTTPMetadataProvidersParserSupport extends Object
Helper class for Spring configuration of HTTP metadata providers.
-
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.LoggerLOGClass logger.static StringMETADATA_URLThe URL for the metadata.static QNameTLS_TRUST_ENGINE_ELEMENT_NAMETLSTrustEngine element name.
-
Constructor Summary
Constructors Modifier Constructor Description privateHTTPMetadataProvidersParserSupport()Constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static BeanDefinitionBuilderbuildCommonClientBuilder(Element element, ParserContext parserContext, Class<?> clientBuildClass, String httpClientSecurityParametersRef, BeanDefinition httpClientSecurityParameters)Build aBeanDefinitionBuilderfor aHttpClientFactoryBeanand populate it from the "standard" attributes which are shared between the Dynamic and Static providers.protected static BeanDefinitionbuildTLSSocketFactory(Element element, ParserContext parserContext, String httpClientSecurityParametersRef, BeanDefinition httpClientSecurityParameters)Build the definition of the HTTPClientBuilder which contains all our configuration.protected static BeanDefinitionparseTLSTrustEngine(Element tlsTrustEngine, ParserContext parserContext)Build the BeanDefinition of theHttpClientSecurityParameterswhich contains the TLS trust engine provided.
-
-
-
Field Detail
-
METADATA_URL
@Nonnull @NotEmpty public static final String METADATA_URL
The URL for the metadata.- See Also:
- Constant Field Values
-
TLS_TRUST_ENGINE_ELEMENT_NAME
@Nonnull public static final QName TLS_TRUST_ENGINE_ELEMENT_NAME
TLSTrustEngine element name.
-
LOG
@Nonnull private static final org.slf4j.Logger LOG
Class logger.
-
-
Method Detail
-
buildTLSSocketFactory
protected static BeanDefinition buildTLSSocketFactory(@Nonnull Element element, @Nonnull ParserContext parserContext, @Nullable String httpClientSecurityParametersRef, @Nullable BeanDefinition httpClientSecurityParameters)
Build the definition of the HTTPClientBuilder which contains all our configuration.- Parameters:
element- the HTTPMetadataProvider parser.parserContext- contexthttpClientSecurityParametersRef- a reference,httpClientSecurityParameters- a bean definition- Returns:
- the bean definition with the parameters. Either httpClientSecurityParametersRef or httpClientSecurityParameters can be present, not both.
-
parseTLSTrustEngine
@Nullable protected static BeanDefinition parseTLSTrustEngine(@Nullable Element tlsTrustEngine, @Nonnull ParserContext parserContext)
Build the BeanDefinition of theHttpClientSecurityParameterswhich contains the TLS trust engine provided.One of the first two parameters must be non-null.
- Parameters:
tlsTrustEngine- if present, the TLSTrustEngine elementparserContext- context- Returns:
- the bean definition
-
buildCommonClientBuilder
@Nonnull protected static BeanDefinitionBuilder buildCommonClientBuilder(@Nonnull Element element, @Nonnull ParserContext parserContext, @Nonnull Class<?> clientBuildClass, @Nullable String httpClientSecurityParametersRef, @Nullable BeanDefinition httpClientSecurityParameters)
Build aBeanDefinitionBuilderfor aHttpClientFactoryBeanand populate it from the "standard" attributes which are shared between the Dynamic and Static providers. non standard defaults are applied by the caller.- Parameters:
element- the configurationparserContext- contextclientBuildClass- the type of builder to create.httpClientSecurityParametersRef- the client security parameters ref to be usedhttpClientSecurityParameters- the client security parameters to be used- Returns:
- an appropriate builder
-
-