@Bean(initMethod = "initialize") public StaticBasicParserPool parserPool() { return new StaticBasicParserPool(); }
@Bean(initMethod = "initialize") public ParserPool parserPool() { return new StaticBasicParserPool(); }
/** * Parser pool used for the OpenSAML parsing. * * @return The parser pool * @see StaticBasicParserPool */ @Bean(initMethod = "initialize") public StaticBasicParserPool parserPool() { return new StaticBasicParserPool(); }
@Bean(initMethod = "initialize") public StaticBasicParserPool parserPool() { return new StaticBasicParserPool(); }
@Bean(initMethod = "initialize") public StaticBasicParserPool parserPool() { return new StaticBasicParserPool(); }
@Bean(initMethod = "initialize") @ConditionalOnMissingBean public ParserPool parserPool() { return new StaticBasicParserPool(); }
private StaticBasicParserPool staticBasicParserPool() { StaticBasicParserPool parserPool = new StaticBasicParserPool(); try { parserPool.initialize(); } catch (XMLParserException e) { e.printStackTrace(); } return parserPool; }
protected static void initializeParserPool() throws ConfigurationException { StaticBasicParserPool pp = new StaticBasicParserPool(); pp.setMaxPoolSize(50); Map<String, Boolean> features = new HashMap<String, Boolean>(); features.put(XMLConstants.FEATURE_SECURE_PROCESSING, true); features.put("http://apache.org/xml/features/disallow-doctype-decl", true); pp.setBuilderFeatures(features); pp.setExpandEntityReferences(false); try { pp.initialize(); } catch (XMLParserException e) { throw new ConfigurationException("Error initializing parser pool", e); } Configuration.setParserPool(pp); } }
protected static void initializeParserPool() throws ConfigurationException { StaticBasicParserPool pp = new StaticBasicParserPool(); pp.setMaxPoolSize(50); Map<String, Boolean> features = new HashMap<String, Boolean>(); features.put(XMLConstants.FEATURE_SECURE_PROCESSING, true); features.put("http://apache.org/xml/features/disallow-doctype-decl", true); pp.setBuilderFeatures(features); pp.setExpandEntityReferences(false); try { pp.initialize(); } catch (XMLParserException e) { throw new ConfigurationException("Error initializing parser pool", e); } Configuration.setParserPool(pp); } }
StaticBasicParserPool pp = new StaticBasicParserPool(); HashMap<String, Boolean> features = new HashMap<String, Boolean>();
StaticBasicParserPool pp = new StaticBasicParserPool(); HashMap<String, Boolean> features = new HashMap<String, Boolean>();
@Bean @Autowired public SAMLMessageHandler samlMessageHandler(@Value("${idp.clock_skew}") int clockSkew, @Value("${idp.expires}") int expires, @Value("${idp.base_url}") String idpBaseUrl, @Value("${idp.compare_endpoints}") boolean compareEndpoints, IdpConfiguration idpConfiguration, JKSKeyManager keyManager) throws XMLParserException, URISyntaxException { StaticBasicParserPool parserPool = new StaticBasicParserPool(); BasicSecurityPolicy securityPolicy = new BasicSecurityPolicy(); securityPolicy.getPolicyRules().addAll(Arrays.asList(new IssueInstantRule(clockSkew, expires))); HTTPRedirectDeflateDecoder httpRedirectDeflateDecoder = new HTTPRedirectDeflateDecoder(parserPool); HTTPPostDecoder httpPostDecoder = new HTTPPostDecoder(parserPool); if (!compareEndpoints) { URIComparator noopComparator = (uri1, uri2) -> true; httpPostDecoder.setURIComparator(noopComparator); httpRedirectDeflateDecoder.setURIComparator(noopComparator); } parserPool.initialize(); HTTPPostSimpleSignEncoder httpPostSimpleSignEncoder = new HTTPPostSimpleSignEncoder(VelocityFactory.getEngine(), "/templates/saml2-post-simplesign-binding.vm", true); return new SAMLMessageHandler( keyManager, Arrays.asList(httpRedirectDeflateDecoder, httpPostDecoder), httpPostSimpleSignEncoder, new StaticSecurityPolicyResolver(securityPolicy), idpConfiguration, idpBaseUrl); }
/** * Initializes the default global parser pool instance. * * <p> * The ParserPool configured by default here is an instance of * {@link StaticBasicParserPool}, with a maxPoolSize property of 50 * and all other properties with default values. * </p> * * <p> * If a deployment wishes to use a different parser pool implementation, * or one configured with different characteristics, they may either override this method, * or simply configure a different ParserPool after bootstrapping via * {@link Configuration#setParserPool(org.opensaml.xml.parse.ParserPool)}. * </p> * * @throws ConfigurationException thrown if there is a problem initializing the parser pool */ protected static void initializeParserPool() throws ConfigurationException { StaticBasicParserPool pp = new StaticBasicParserPool(); pp.setMaxPoolSize(50); try { pp.initialize(); } catch (XMLParserException e) { throw new ConfigurationException("Error initializing parser pool", e); } Configuration.setParserPool(pp); }