當前位置: 首頁>>代碼示例>>Java>>正文


Java BasicSecurityConfiguration類代碼示例

本文整理匯總了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);
}
 
開發者ID:choonchernlim,項目名稱:spring-security-adfs-saml2,代碼行數:8,代碼來源:DefaultSAMLBootstrap.java

示例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);
}
 
開發者ID:ulisesbocchio,項目名稱:spring-boot-security-saml-samples,代碼行數:8,代碼來源:Auth0SSODemoApplication.java

示例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);
}
 
開發者ID:apigee,項目名稱:java-opensaml2,代碼行數:30,代碼來源:MetadataCredentialResolverTest.java


注:本文中的org.opensaml.xml.security.BasicSecurityConfiguration類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。