edu.internet2.middleware.shibboleth.common.config.metadata
Class HTTPMetadataProviderBeanDefinitionParser

java.lang.Object
  extended by org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
      extended by org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
          extended by edu.internet2.middleware.shibboleth.common.config.metadata.BaseMetadataProviderBeanDefinitionParser
              extended by edu.internet2.middleware.shibboleth.common.config.metadata.AbstractMetadataProviderBeanDefinitionParser
                  extended by edu.internet2.middleware.shibboleth.common.config.metadata.AbstractReloadingMetadataProviderBeanDefinitionParser
                      extended by edu.internet2.middleware.shibboleth.common.config.metadata.HTTPMetadataProviderBeanDefinitionParser
All Implemented Interfaces:
org.springframework.beans.factory.xml.BeanDefinitionParser
Direct Known Subclasses:
FileBackedHTTPMetadataProviderBeanDefinitionParser

public class HTTPMetadataProviderBeanDefinitionParser
extends AbstractReloadingMetadataProviderBeanDefinitionParser

Spring bean definition parser for Shibboleth file backed url metadata provider definition.


Field Summary
static QName TYPE_NAME
          Schema type name.
 
Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
ID_ATTRIBUTE
 
Constructor Summary
HTTPMetadataProviderBeanDefinitionParser()
           
 
Method Summary
protected  org.apache.commons.httpclient.HttpClient buildHttpClient(Element config, String providerId, URL metadataURL)
          Builds the HTTP client used to fetch metadata.
protected  X509TrustManager buildNoTrustTrustManager()
          Builds a X509TrustManager which bypasses all X.509 validation steps.
protected  void doParse(Element config, org.springframework.beans.factory.xml.ParserContext parserContext, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
          
protected  Class getBeanClass(Element element)
          
protected  void setHttpBasicAuthSettings(org.apache.commons.httpclient.HttpClient httpClient, Element config, String providerId, URL metadataURL)
          Sets the basic authentication properties, if any, for the HTTP client used to fetch metadata.
protected  void setHttpProxySettings(org.opensaml.ws.soap.client.http.HttpClientBuilder builder, Element config, String providerId)
          Sets the HTTP proxy properties, if any, for the HTTP client used to fetch metadata.
 
Methods inherited from class edu.internet2.middleware.shibboleth.common.config.metadata.AbstractReloadingMetadataProviderBeanDefinitionParser
getMaxRefreshDelay, getMinRefreshDelay, getParserPoolRef, getRefreshDelayFactor, getTaskTimerRef
 
Methods inherited from class edu.internet2.middleware.shibboleth.common.config.metadata.AbstractMetadataProviderBeanDefinitionParser
getFailFastInitialization
 
Methods inherited from class edu.internet2.middleware.shibboleth.common.config.metadata.BaseMetadataProviderBeanDefinitionParser
getProviderId, getRequireValidMetadata
 
Methods inherited from class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
doParse, getBeanClassName, getParentName, parseInternal
 
Methods inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
parse, postProcessComponentDefinition, registerBeanDefinition, resolveId, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_NAME

public static final QName TYPE_NAME
Schema type name.

Constructor Detail

HTTPMetadataProviderBeanDefinitionParser

public HTTPMetadataProviderBeanDefinitionParser()
Method Detail

getBeanClass

protected Class getBeanClass(Element element)

Overrides:
getBeanClass in class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser

doParse

protected void doParse(Element config,
                       org.springframework.beans.factory.xml.ParserContext parserContext,
                       org.springframework.beans.factory.support.BeanDefinitionBuilder builder)

Overrides:
doParse in class AbstractReloadingMetadataProviderBeanDefinitionParser

buildHttpClient

protected org.apache.commons.httpclient.HttpClient buildHttpClient(Element config,
                                                                   String providerId,
                                                                   URL metadataURL)
Builds the HTTP client used to fetch metadata.

Parameters:
config - the metadata provider configuration element
providerId - the ID of the metadata provider
metadataURL - the URL from which metadata will be fetched
Returns:
the constructed HTTP client

buildNoTrustTrustManager

protected X509TrustManager buildNoTrustTrustManager()
Builds a X509TrustManager which bypasses all X.509 validation steps.

Returns:
the trustless trust manager

setHttpProxySettings

protected void setHttpProxySettings(org.opensaml.ws.soap.client.http.HttpClientBuilder builder,
                                    Element config,
                                    String providerId)
Sets the HTTP proxy properties, if any, for the HTTP client used to fetch metadata.

Parameters:
builder - the HTTP client builder
config - the metadata provider configuration
providerId - the ID of the metadata provider

setHttpBasicAuthSettings

protected void setHttpBasicAuthSettings(org.apache.commons.httpclient.HttpClient httpClient,
                                        Element config,
                                        String providerId,
                                        URL metadataURL)
Sets the basic authentication properties, if any, for the HTTP client used to fetch metadata.

Parameters:
httpClient - the HTTP client
config - the metadata provider configuration
providerId - the ID of the metadata provider
metadataURL - the URL from which metadata will be fetched


Copyright © 2006-2011 Internet2. All Rights Reserved.