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


Java MapBasedStorageService类代码示例

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


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

示例1: afterPropertiesSet

import org.opensaml.util.storage.MapBasedStorageService; //导入依赖的package包/类
@Override
public void afterPropertiesSet() throws Exception {
	Assert.notEmpty(this.processorConfiguration, "Query Processors not configured !");
	Assert.notEmpty(this.bindingConfiguration, "Bindings not configured !");
	Assert.notNull(this.samlMessageDecoders, "No SAML message decoders configured !");
	Assert.notNull(this.signatureValidator, "No signature validator configured !");

	// TODO MBD: what to do with this ?
	final StorageService<String, ReplayCacheEntry> storageEngine = new MapBasedStorageService<String, ReplayCacheEntry>();
	final ReplayCache replayCache = new ReplayCache(storageEngine, 60 * 1000 * this.replayMinutes);
	this.rule = new MessageReplayRule(replayCache);

	Assert.notNull(this.samlMessageDecoders, "No SAML message decoders provided for this IdP connector !");
	for (final SamlBindingEnum binding : SamlBindingEnum.values()) {
		Assert.notNull(this.samlMessageDecoders.get(binding),
				String.format("No SAML message decoder provided for the binding [%s] !", binding.getDescription()));
	}

}
 
开发者ID:mxbossard,项目名称:java-saml2-sp,代码行数:20,代码来源:OpenSaml2QueryProcessorFactory.java

示例2: setUp

import org.opensaml.util.storage.MapBasedStorageService; //导入依赖的package包/类
/** {@inheritDoc} */
protected void setUp() throws Exception {
    super.setUp();

    messageID = "abc123";

    messageContext.setInboundMessageIssuer("issuer");
    messageContext.setInboundSAMLMessageId(messageID);

    storageEngine = new MapBasedStorageService<String, ReplayCacheEntry>();
    replayCache = new ReplayCache(storageEngine, 60 * 10 * 1000);
    rule = new MessageReplayRule(replayCache);
}
 
开发者ID:apigee,项目名称:java-opensaml2,代码行数:14,代码来源:MessageReplayRuleTest.java


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