本文整理汇总了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()));
}
}
示例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);
}