本文整理汇总了Java中org.opensaml.DefaultBootstrap.bootstrap方法的典型用法代码示例。如果您正苦于以下问题:Java DefaultBootstrap.bootstrap方法的具体用法?Java DefaultBootstrap.bootstrap怎么用?Java DefaultBootstrap.bootstrap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opensaml.DefaultBootstrap
的用法示例。
在下文中一共展示了DefaultBootstrap.bootstrap方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: 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);
}
}
}
示例3: 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();
}
示例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");
}
}
示例5: 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) {
}
}
示例6: SPIDIntegrationUtil
import org.opensaml.DefaultBootstrap; //导入方法依赖的package包/类
public SPIDIntegrationUtil() {
try {
DefaultBootstrap.bootstrap();
}
catch (ConfigurationException e) {
log.error("SPIDIntegrationUtil :: " + e.getMessage(), e);
}
}
示例7: 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);
}
}
}
示例8: 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");
}
示例9: 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);
}
}
}
示例10: 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);
}
}
}
示例11: 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();
}
示例12: 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;
}
}
示例13: 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");
}
示例14: 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) {
}
}
示例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);
}
}
}