| <?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> > <a href="index.html" class="el_package">org.apache.rahas</a> > <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 |
| * "License"); 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 |
| * "AS IS" 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> |
| "/default-config.xml", |
| "/schema-config.xml", |
| "/signature-config.xml", |
| "/signature-validation-config.xml", |
| "/encryption-config.xml", |
| "/encryption-validation-config.xml", |
| "/soap11-config.xml", |
| "/wsfed11-protocol-config.xml", |
| "/saml1-assertion-config.xml", |
| "/saml1-protocol-config.xml", |
| "/saml1-core-validation-config.xml", |
| "/saml2-assertion-config.xml", |
| "/saml2-protocol-config.xml", |
| "/saml2-core-validation-config.xml", |
| "/saml1-metadata-config.xml", |
| "/saml2-metadata-config.xml", |
| "/saml2-metadata-validation-config.xml", |
| "/saml2-metadata-attr-config.xml", |
| "/saml2-metadata-idp-discovery-config.xml", |
| "/saml2-metadata-ui-config.xml", |
| "/saml2-protocol-thirdparty-config.xml", |
| "/saml2-metadata-query-config.xml", |
| "/saml2-assertion-delegation-restriction-config.xml", |
| "/saml2-ecp-config.xml", |
| "/xacml10-saml2-profile-config.xml", |
| "/xacml11-saml2-profile-config.xml", |
| "/xacml20-context-config.xml", |
| "/xacml20-policy-config.xml", |
| "/xacml2-saml2-profile-config.xml", |
| "/xacml3-saml2-profile-config.xml", |
| "/wsaddressing-config.xml", |
| "/wssecurity-config.xml", |
| }; |
| |
| 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("Error initializing axiom based parser pool", 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> |