本文整理汇总了Java中org.openid4java.consumer.ConsumerManager.setMinAssocSessEnc方法的典型用法代码示例。如果您正苦于以下问题:Java ConsumerManager.setMinAssocSessEnc方法的具体用法?Java ConsumerManager.setMinAssocSessEnc怎么用?Java ConsumerManager.setMinAssocSessEnc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openid4java.consumer.ConsumerManager
的用法示例。
在下文中一共展示了ConsumerManager.setMinAssocSessEnc方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: reconnectToMxID
import org.openid4java.consumer.ConsumerManager; //导入方法依赖的package包/类
private void reconnectToMxID() {
LOG.info("Starting OpenId handler ... OpenIDReturnURL = " + OPENID_RETURN_URL + "; OpenIdProvider: " + OPENID_PROVIDER);
try {
manager = new ConsumerManager();
manager.setAssociations(new InMemoryConsumerAssociationStore());
manager.setNonceVerifier(new InMemoryNonceVerifier(5000));
manager.setMinAssocSessEnc(AssociationSessionType.DH_SHA256);
manager.getRealmVerifier().setEnforceRpId(true);
discoveries = manager.discover(OPENID_PROVIDER);
discovered = manager.associate(discoveries);
started = true;
LOG.info("Starting OpenId handler ... DONE");
} catch (DiscoveryException e) {
LOG.error("Failed to discover OpenId service: " + e.getMessage(), e);
}
}
示例2: reconnectToMxID
import org.openid4java.consumer.ConsumerManager; //导入方法依赖的package包/类
private void reconnectToMxID() {
log.info("Starting OpenId handler ... OpenIDReturnURL = " + OpenIDReturnURL + "; OpenIdProvider: " + OPENID_PROVIDER);
try {
manager = new ConsumerManager();
manager.setAssociations(new InMemoryConsumerAssociationStore());
manager.setNonceVerifier(new InMemoryNonceVerifier(5000));
manager.setMinAssocSessEnc(AssociationSessionType.DH_SHA256);
manager.getRealmVerifier().setEnforceRpId(true);
discoveries = manager.discover(OPENID_PROVIDER);
discovered = manager.associate(discoveries);
started = true;
log.info("Starting OpenId handler ... DONE");
} catch (Exception e) {
log.error("Failed to discover OpenId service: " + e.getMessage(), e);
}
}