当前位置: 首页>>代码示例>>Java>>正文


Java DefaultBootstrap类代码示例

本文整理汇总了Java中org.opensaml.DefaultBootstrap的典型用法代码示例。如果您正苦于以下问题:Java DefaultBootstrap类的具体用法?Java DefaultBootstrap怎么用?Java DefaultBootstrap使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DefaultBootstrap类属于org.opensaml包,在下文中一共展示了DefaultBootstrap类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doBootstrap

import org.opensaml.DefaultBootstrap; //导入依赖的package包/类
public static void doBootstrap() {

        /* Initializing the OpenSAML library */
        if (!bootStrapped) {
            Thread thread = Thread.currentThread();
            ClassLoader loader = thread.getContextClassLoader();
            thread.setContextClassLoader(new DefaultSAML2SSOManager().getClass().getClassLoader());
            try {
                DefaultBootstrap.bootstrap();
                bootStrapped = true;
            } catch (ConfigurationException e) {
                log.error("Error in bootstrapping the OpenSAML2 library", e);
            } finally {
                thread.setContextClassLoader(loader);
            }
        }
    }
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:18,代码来源:DefaultSAML2SSOManager.java

示例2: init

import org.opensaml.DefaultBootstrap; //导入依赖的package包/类
@Override
public void init() throws IdentityOAuth2Exception {

    super.init();

    Thread thread = Thread.currentThread();
    ClassLoader loader = thread.getContextClassLoader();
    thread.setContextClassLoader(this.getClass().getClassLoader());

    try {
        DefaultBootstrap.bootstrap();
    } catch (ConfigurationException e) {
        log.error("Error in bootstrapping the OpenSAML2 library", e);
        throw new IdentityOAuth2Exception("Error in bootstrapping the OpenSAML2 library");
    } finally {
        thread.setContextClassLoader(loader);
    }

    profileValidator = new SAMLSignatureProfileValidator();
}
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:21,代码来源:SAML2BearerGrantHandler.java

示例3: getSAMLBuilder

import org.opensaml.DefaultBootstrap; //导入依赖的package包/类
private static XMLObjectBuilderFactory getSAMLBuilder() throws ConfigurationException {

	if (builderFactory == null) {
	    // OpenSAML 2.3
	    DefaultBootstrap.bootstrap();
	    builderFactory = Configuration.getBuilderFactory();
	    nameIdBuilder = (SAMLObjectBuilder) getSAMLBuilder().getBuilder(NameID.DEFAULT_ELEMENT_NAME);
	    confirmationMethodBuilder = (SAMLObjectBuilder) getSAMLBuilder().getBuilder(SubjectConfirmationData.DEFAULT_ELEMENT_NAME);
	    subjectConfirmationBuilder = (SAMLObjectBuilder) getSAMLBuilder().getBuilder(SubjectConfirmation.DEFAULT_ELEMENT_NAME);
	    subjectBuilder = (SAMLObjectBuilder) getSAMLBuilder().getBuilder(Subject.DEFAULT_ELEMENT_NAME);
	    attrStatementBuilder = (SAMLObjectBuilder) getSAMLBuilder().getBuilder(AttributeStatement.DEFAULT_ELEMENT_NAME);
	    audienceRestrictionnBuilder = (SAMLObjectBuilder) getSAMLBuilder().getBuilder(AudienceRestriction.DEFAULT_ELEMENT_NAME);
	    audienceBuilder = (SAMLObjectBuilder) getSAMLBuilder().getBuilder(Audience.DEFAULT_ELEMENT_NAME);
	    authStatementBuilder = (SAMLObjectBuilder) getSAMLBuilder().getBuilder(AuthnStatement.DEFAULT_ELEMENT_NAME);
	    authContextBuilder = (SAMLObjectBuilder) getSAMLBuilder().getBuilder(AuthnContext.DEFAULT_ELEMENT_NAME);
	    authContextClassRefBuilder = (SAMLObjectBuilder) getSAMLBuilder().getBuilder(AuthnContextClassRef.DEFAULT_ELEMENT_NAME);
	    issuerBuilder = (SAMLObjectBuilder) getSAMLBuilder().getBuilder(Issuer.DEFAULT_ELEMENT_NAME);
	    assertionBuilder = (SAMLObjectBuilder) getSAMLBuilder().getBuilder(Assertion.DEFAULT_ELEMENT_NAME);

	}

	return builderFactory;
    }
 
开发者ID:mwdb,项目名称:OA2C,代码行数:24,代码来源:LocalSamlTokenFactory.java

示例4: init

import org.opensaml.DefaultBootstrap; //导入依赖的package包/类
@Override
public void init(FilterConfig filterConfig) throws ServletException {
    Configuration.validateJCEProviders();
    Configuration.validateNonSunJAXP();
    
    for (Provider jceProvider : Security.getProviders()) {
        logger.info(jceProvider.getInfo());
    }

    try {
        logger.info("Bootstrapping");
        DefaultBootstrap.bootstrap();
    } catch (ConfigurationException e) {
        throw new RuntimeException("Bootstrapping failed");
    }
}
 
开发者ID:rasmusson,项目名称:webprofile-ref-project,代码行数:17,代码来源:AccessFilter.java

示例5: SPIDIntegrationUtil

import org.opensaml.DefaultBootstrap; //导入依赖的package包/类
public SPIDIntegrationUtil() {
	try {
		DefaultBootstrap.bootstrap();
	}
	catch (ConfigurationException e) {
		log.error("SPIDIntegrationUtil :: " + e.getMessage(), e);
	}
}
 
开发者ID:italia,项目名称:spid-spring,代码行数:9,代码来源:SPIDIntegrationUtil.java

示例6: doBootstrap

import org.opensaml.DefaultBootstrap; //导入依赖的package包/类
/**
 * Bootstrap the OpenSAML2 library only if it is not bootstrapped.
 */
public static void doBootstrap() {

    if (!isBootStrapped) {
        try {
            DefaultBootstrap.bootstrap();
            isBootStrapped = true;
        } catch (ConfigurationException e) {
            log.error("Error in bootstrapping the OpenSAML2 library", e);
        }
    }
}
 
开发者ID:wso2,项目名称:carbon-identity-framework,代码行数:15,代码来源:WSXACMLMessageReceiver.java

示例7: testUnmarshall

import org.opensaml.DefaultBootstrap; //导入依赖的package包/类
@Test
public void testUnmarshall() throws Exception {
    DefaultBootstrap.bootstrap();
    String xmlString = "<saml:Audience xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\">https://sp.example.com/SAML2</saml:Audience>";
    XMLObject xmlObject = IdentityUtil.unmarshall(xmlString);
    assertEquals(xmlObject.getElementQName().getLocalPart(), "Audience", "Unmarshalled object doesn't match the " +
            "expected result");
}
 
开发者ID:wso2,项目名称:carbon-identity-framework,代码行数:9,代码来源:IdentityUtilTest.java

示例8: ensureOpenSamlIsInitialized

import org.opensaml.DefaultBootstrap; //导入依赖的package包/类
private synchronized static void ensureOpenSamlIsInitialized() throws SamlException {
  if (!initializedOpenSaml) {
    try {
      DefaultBootstrap.bootstrap();
      initializedOpenSaml = true;
    } catch (Throwable ex) {
      throw new SamlException("Error while initializing the Open SAML library", ex);
    }
  }
}
 
开发者ID:coveo,项目名称:saml-client,代码行数:11,代码来源:SamlClient.java

示例9: doBootstrap

import org.opensaml.DefaultBootstrap; //导入依赖的package包/类
public static void doBootstrap() throws SSOAgentException {
    if (!isBootStrapped) {
        try {
            DefaultBootstrap.bootstrap();
            isBootStrapped = true;
        } catch (ConfigurationException e) {
            throw new SSOAgentException("Error in bootstrapping the OpenSAML2 library", e);
        }
    }
}
 
开发者ID:wso2-extensions,项目名称:identity-agent-sso,代码行数:11,代码来源:SSOAgentUtils.java

示例10: initializeOpenSAML

import org.opensaml.DefaultBootstrap; //导入依赖的package包/类
/**
 * Initializes the OpenSAML library.
 * 
 * @throws Exception
 *           for init errors
 */
@BeforeClass
public static void initializeOpenSAML() throws Exception {

  logger.debug("Initializing OpenSAML 2.X library ...");
  DefaultBootstrap.bootstrap();
  EidasBootstrap.getInstance().bootstrap();
}
 
开发者ID:litsec,项目名称:eidas-opensaml,代码行数:14,代码来源:OpenSAMLTestBase.java

示例11: bootstrap

import org.opensaml.DefaultBootstrap; //导入依赖的package包/类
/**
 * Configure xmltools with WS-Trust types. 
 * 
 * This method can be called any number of times, only the first will actually load the types.
 */
public static void bootstrap() {
	if (!bootstrapped) {
        Class<Configuration> clazz = Configuration.class;

        String[] config = {
        		"/wsaddressing-config.xml",
        		"/wspolicy-config.xml",
        		"/wssecurity-config.xml",
        		"/wstrust-config.xml",
        		"/dk/itst/oiosaml/liberty/liberty-config.xml",
        };
        if (log.isDebugEnabled())  log.debug("Loading XMLTooling configuration " + config);
        try {
			DefaultBootstrap.bootstrap();
			
        	XMLConfigurator configurator = new XMLConfigurator();
        	for (String c : config) {
        		log.debug("Loading config " + c);
        		configurator.load(clazz.getResourceAsStream(c));	
			}
		} catch (ConfigurationException e) {
			throw new RuntimeException(e);
		}
		bootstrapped = true;
	}
}
 
开发者ID:amagdenko,项目名称:oiosaml.java,代码行数:32,代码来源:TrustBootstrap.java

示例12: init

import org.opensaml.DefaultBootstrap; //导入依赖的package包/类
@Override
public final void init(ServletConfig pServletConfig) throws ServletException {
  super.init(pServletConfig);

  // Configure the logging properties for FoxLogger
  PropertyConfigurator.configure(pServletConfig.getServletContext().getRealPath("/WEB-INF/config/log4j.properties"));

  // Avoid the oracle XML parsers being used for document building and SAX parsing
  System.setProperty("javax.xml.parsers.DocumentBuilderFactory", "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");
  System.setProperty("javax.xml.parsers.SAXParserFactory", "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl");


  // Initializes the OpenSAML library, loading default configurations
  try {
    DefaultBootstrap.bootstrap();
  }
  catch (ConfigurationException e) {
    throw new ExInternal("Failed to initialise the OpenSAML library, loading default configurations", e);
  }

  if (FoxGlobals.getInstance().isEngineInitialised()) {
    FoxLogger.getLogger().info("FoxBoot: already initialised");
    return;
  }
  else {
    //Initialise globals object with retrieved servlet config
    FoxGlobals.getInstance().initialise(pServletConfig.getServletContext());

    EngineInitialisationController.initialiseEngine(false);
  }

  FoxLogger.getLogger().info("FoxBoot init");
}
 
开发者ID:Fivium,项目名称:FOXopen,代码行数:34,代码来源:FoxBootServlet.java

示例13: SAMLOAuthTokenServlet

import org.opensaml.DefaultBootstrap; //导入依赖的package包/类
public SAMLOAuthTokenServlet(AuthenticationConfigurationManager authenticationConfigurationManager,
                             ApplicationLinkService applicationLinkService)
{
    this.jamConsumerProviderStore = new JamConsumerProviderStore(authenticationConfigurationManager);
    this.applicationLinkService = applicationLinkService;
    
    // Bootstrap the OpenSAML library
    try {
        DefaultBootstrap.bootstrap();
    } catch (ConfigurationException e) {
    }
}
 
开发者ID:SAP,项目名称:SAPJamWorkPatternJIRAIntegration,代码行数:13,代码来源:SAMLOAuthTokenServlet.java

示例14: JamRequestFactory

import org.opensaml.DefaultBootstrap; //导入依赖的package包/类
public JamRequestFactory(RequestFactory<?> requestFactory, JamConsumer consumer, String username)
{
    this.requestFactory = requestFactory;
    this.consumer       = consumer;
    this.username       = username;


    // Bootstrap the OpenSAML library
    try {
        DefaultBootstrap.bootstrap();
    } catch (ConfigurationException e) {
    }
}
 
开发者ID:SAP,项目名称:SAPJamWorkPatternJIRAIntegration,代码行数:14,代码来源:JamRequestFactory.java

示例15: doBootstrap

import org.opensaml.DefaultBootstrap; //导入依赖的package包/类
public static void doBootstrap() {

        /* Initializing the OpenSAML library */
        if (!bootStrapped) {
            try {
                DefaultBootstrap.bootstrap();
                bootStrapped = true;
            } catch (ConfigurationException e) {
                log.error("Error in bootstrapping the OpenSAML2 library", e);
            }
        }
    }
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:13,代码来源:PassiveSTSManager.java


注:本文中的org.opensaml.DefaultBootstrap类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。