blob: 6dccb75ee7368f99046abe74fb78c75c35d84ff6 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>RampartSAMLBootstrap.java</title><link rel="stylesheet" href="../.resources/prettify.css" type="text/css"/><script type="text/javascript" src="../.resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="right"><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Coverage Report</a> &gt; <a href="index.html" class="el_package">org.apache.rahas</a> &gt; <span class="el_source">RampartSAMLBootstrap.java</span></div><h1>RampartSAMLBootstrap.java</h1><pre class="source lang-java linenums">/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* &quot;License&quot;); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.rahas;
import org.apache.rahas.impl.util.AxiomParserPool;
import org.opensaml.Configuration;
import org.opensaml.DefaultBootstrap;
import org.opensaml.xml.ConfigurationException;
import org.opensaml.xml.parse.XMLParserException;
/**
* Rampart specific SAML bootstrap class. Here we set parser pool to
* axiom specific one.
*/
public class RampartSAMLBootstrap extends DefaultBootstrap {
/** List of default XMLTooling configuration files. */
<span class="fc" id="L35"> private static String[] xmlToolingConfigs = {</span>
&quot;/default-config.xml&quot;,
&quot;/schema-config.xml&quot;,
&quot;/signature-config.xml&quot;,
&quot;/signature-validation-config.xml&quot;,
&quot;/encryption-config.xml&quot;,
&quot;/encryption-validation-config.xml&quot;,
&quot;/soap11-config.xml&quot;,
&quot;/wsfed11-protocol-config.xml&quot;,
&quot;/saml1-assertion-config.xml&quot;,
&quot;/saml1-protocol-config.xml&quot;,
&quot;/saml1-core-validation-config.xml&quot;,
&quot;/saml2-assertion-config.xml&quot;,
&quot;/saml2-protocol-config.xml&quot;,
&quot;/saml2-core-validation-config.xml&quot;,
&quot;/saml1-metadata-config.xml&quot;,
&quot;/saml2-metadata-config.xml&quot;,
&quot;/saml2-metadata-validation-config.xml&quot;,
&quot;/saml2-metadata-attr-config.xml&quot;,
&quot;/saml2-metadata-idp-discovery-config.xml&quot;,
&quot;/saml2-metadata-ui-config.xml&quot;,
&quot;/saml2-protocol-thirdparty-config.xml&quot;,
&quot;/saml2-metadata-query-config.xml&quot;,
&quot;/saml2-assertion-delegation-restriction-config.xml&quot;,
&quot;/saml2-ecp-config.xml&quot;,
&quot;/xacml10-saml2-profile-config.xml&quot;,
&quot;/xacml11-saml2-profile-config.xml&quot;,
&quot;/xacml20-context-config.xml&quot;,
&quot;/xacml20-policy-config.xml&quot;,
&quot;/xacml2-saml2-profile-config.xml&quot;,
&quot;/xacml3-saml2-profile-config.xml&quot;,
&quot;/wsaddressing-config.xml&quot;,
&quot;/wssecurity-config.xml&quot;,
};
protected RampartSAMLBootstrap() {
<span class="nc" id="L71"> super();</span>
<span class="nc" id="L72"> }</span>
public static synchronized void bootstrap() throws ConfigurationException {
<span class="fc" id="L75"> initializeXMLSecurity();</span>
<span class="fc" id="L77"> initializeVelocity();</span>
<span class="fc" id="L79"> initializeXMLTooling(xmlToolingConfigs);</span>
<span class="fc" id="L81"> initializeArtifactBuilderFactories();</span>
<span class="fc" id="L83"> initializeGlobalSecurityConfiguration();</span>
<span class="fc" id="L85"> initializeParserPool();</span>
<span class="fc" id="L87"> initializeESAPI();</span>
<span class="fc" id="L88"> }</span>
protected static void initializeParserPool() throws ConfigurationException {
<span class="fc" id="L92"> AxiomParserPool pp = new AxiomParserPool();</span>
<span class="fc" id="L93"> pp.setMaxPoolSize(50);</span>
try {
<span class="fc" id="L95"> pp.initialize();</span>
<span class="nc" id="L96"> } catch (XMLParserException e) {</span>
<span class="nc" id="L97"> throw new ConfigurationException(&quot;Error initializing axiom based parser pool&quot;, e);</span>
<span class="fc" id="L98"> }</span>
<span class="fc" id="L99"> Configuration.setParserPool(pp);</span>
<span class="fc" id="L101"> }</span>
}
</pre><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.6.1.201212231917</span></div></body></html>