本文整理匯總了Java中org.opensaml.xml.security.BasicSecurityConfiguration類的典型用法代碼示例。如果您正苦於以下問題:Java BasicSecurityConfiguration類的具體用法?Java BasicSecurityConfiguration怎麽用?Java BasicSecurityConfiguration使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
BasicSecurityConfiguration類屬於org.opensaml.xml.security包,在下文中一共展示了BasicSecurityConfiguration類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: postProcessBeanFactory
import org.opensaml.xml.security.BasicSecurityConfiguration; //導入依賴的package包/類
@Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
super.postProcessBeanFactory(beanFactory);
BasicSecurityConfiguration config = (BasicSecurityConfiguration) Configuration.getGlobalSecurityConfiguration();
config.registerSignatureAlgorithmURI(signatureAlgorithmName, signatureAlgorithmURI);
config.setSignatureReferenceDigestMethod(digestAlgorithmURI);
}
示例2: postProcessBeanFactory
import org.opensaml.xml.security.BasicSecurityConfiguration; //導入依賴的package包/類
@Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
super.postProcessBeanFactory(beanFactory);
BasicSecurityConfiguration config = (BasicSecurityConfiguration) org.opensaml.Configuration.getGlobalSecurityConfiguration();
config.registerSignatureAlgorithmURI("RSA", SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA256);
config.setSignatureReferenceDigestMethod(SignatureConstants.ALGO_ID_DIGEST_SHA256);
}
示例3: setUp
import org.opensaml.xml.security.BasicSecurityConfiguration; //導入依賴的package包/類
/** {@inheritDoc} */
protected void setUp() throws Exception {
super.setUp();
idpRSAPubKey = SecurityTestHelper.buildJavaRSAPublicKey(idpRSAPubKeyBase64);
idpDSACert = SecurityTestHelper.buildJavaX509Cert(idpDSACertBase64);
idpRSACert = SecurityTestHelper.buildJavaX509Cert(idpRSACertBase64);
keyAuthorityCert = SecurityTestHelper.buildJavaX509Cert(keyAuthorityCertBase64);
Document mdDoc = parser.parse(MetadataCredentialResolverTest.class.getResourceAsStream(mdFileName));
mdProvider = new DOMMetadataProvider(mdDoc.getDocumentElement());
mdProvider.initialize();
//For testing, use default KeyInfo resolver from global security config, per metadata resolver constructor
origGlobalSecurityConfig = Configuration.getGlobalSecurityConfiguration();
BasicSecurityConfiguration newSecConfig = new BasicSecurityConfiguration();
newSecConfig.setDefaultKeyInfoCredentialResolver( SecurityTestHelper.buildBasicInlineKeyInfoResolver() );
Configuration.setGlobalSecurityConfiguration(newSecConfig);
mdResolver = new MetadataCredentialResolver(mdProvider);
entityCriteria = new EntityIDCriteria(idpEntityID);
// by default set protocol to null
mdCriteria = new MetadataCriteria(idpRole, null);
criteriaSet = new CriteriaSet();
criteriaSet.add(entityCriteria);
criteriaSet.add(mdCriteria);
}