本文整理汇总了Java中org.xdi.util.security.PropertiesDecrypter.decryptProperties方法的典型用法代码示例。如果您正苦于以下问题:Java PropertiesDecrypter.decryptProperties方法的具体用法?Java PropertiesDecrypter.decryptProperties怎么用?Java PropertiesDecrypter.decryptProperties使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.xdi.util.security.PropertiesDecrypter
的用法示例。
在下文中一共展示了PropertiesDecrypter.decryptProperties方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createConnectionAuthProvider
import org.xdi.util.security.PropertiesDecrypter; //导入方法依赖的package包/类
private void createConnectionAuthProvider(String configurationLdapConfigComponentName, String fileName, String configurationComponentName, String connectionProviderComponentName) {
FileConfiguration configuration = new FileConfiguration(fileName);
Contexts.getApplicationContext().set(configurationComponentName, configuration);
//
Properties properties = configuration.getProperties();
if (this.ldapConfig != null) {
Contexts.getApplicationContext().set(configurationLdapConfigComponentName, this.ldapConfig);
properties.setProperty("servers", buildServersString(this.ldapConfig.getServers()));
properties.setProperty("bindDN", this.ldapConfig.getBindDN());
properties.setProperty("bindPassword", this.ldapConfig.getBindPassword());
properties.setProperty("useSSL", Boolean.toString(this.ldapConfig.isUseSSL()));
}
//
LdapConnectionService connectionProvider = new LdapConnectionService(PropertiesDecrypter.decryptProperties(properties, oxTrustConfiguration.getCryptoConfigurationSalt()));
Contexts.getApplicationContext().set(connectionProviderComponentName, connectionProvider);
}
示例2: prepareLdapServerConnection
import org.xdi.util.security.PropertiesDecrypter; //导入方法依赖的package包/类
private LdapServerConnection prepareLdapServerConnection(CacheRefreshConfiguration cacheRefreshConfiguration, GluuLdapConfiguration ldapConfiguration, boolean useLocalConnection) {
String ldapConfig = ldapConfiguration.getConfigId();
if (useLocalConnection) {
return new LdapServerConnection(ldapConfig, ldapEntryManager, getBaseDNs(ldapConfiguration));
}
Properties ldapProperties = toLdapProperties(ldapConfiguration);
LDAPConnectionProvider ldapConnectionProvider = new LDAPConnectionProvider(PropertiesDecrypter.decryptProperties(ldapProperties, cryptoConfigurationSalt));
if (!ldapConnectionProvider.isConnected()) {
log.error("Failed to connect to LDAP server using configuration {0}", ldapConfig);
return null;
}
return new LdapServerConnection(ldapConfig, ldapConnectionProvider, getBaseDNs(ldapConfiguration));
}
示例3: createConnectionProvider
import org.xdi.util.security.PropertiesDecrypter; //导入方法依赖的package包/类
private void createConnectionProvider(FileConfiguration configuration, String configurationComponentName, String connectionProviderComponentName) {
Contexts.getApplicationContext().set(configurationComponentName, configuration);
LdapConnectionService connectionProvider = null;
if (configuration != null) {
connectionProvider = new LdapConnectionService(PropertiesDecrypter.decryptProperties(configuration
.getProperties(), oxTrustConfiguration.getCryptoConfigurationSalt()));
}
Contexts.getApplicationContext().set(connectionProviderComponentName, connectionProvider);
}
示例4: createLdapEntryManager
import org.xdi.util.security.PropertiesDecrypter; //导入方法依赖的package包/类
private LdapEntryManager createLdapEntryManager() {
Properties connectionProperties = (Properties) this.ldapConfiguration.getProperties();
Properties decryptedConnectionProperties = PropertiesDecrypter.decryptProperties(connectionProperties, this.cryptoConfigurationSalt);
LDAPConnectionProvider connectionProvider = new LDAPConnectionProvider(decryptedConnectionProperties);
LdapEntryManager ldapEntryManager = new LdapEntryManager(new OperationsFacade(connectionProvider, null));
logger.debug("Created LdapEntryManager: {}", ldapEntryManager);
return ldapEntryManager;
}
示例5: createLdapEntryManager
import org.xdi.util.security.PropertiesDecrypter; //导入方法依赖的package包/类
private LdapEntryManager createLdapEntryManager() {
Properties connectionProperties = (Properties) this.ldapConfiguration.getProperties();
Properties decryptedConnectionProperties = PropertiesDecrypter.decryptProperties(connectionProperties, this.cryptoConfigurationSalt);
LdapEntryManagerFactory ldapEntryManagerFactory = new LdapEntryManagerFactory();
LdapEntryManager ldapEntryManager = ldapEntryManagerFactory.createEntryManager(decryptedConnectionProperties);
logger.debug("Created LdapEntryManager: {}", ldapEntryManager);
return ldapEntryManager;
}
示例6: init
import org.xdi.util.security.PropertiesDecrypter; //导入方法依赖的package包/类
@BeforeClass
public void init() {
final FileConfiguration fileConfiguration = new FileConfiguration(LDAP_FILE_PATH);
final Properties props = PropertiesDecrypter.decryptProperties(fileConfiguration.getProperties(), "passoword");
final LdapEntryManagerFactory ldapEntryManagerFactory = new LdapEntryManagerFactory();
final LdapConnectionProvider connectionProvider = new LdapConnectionProvider(props);
MANAGER = ldapEntryManagerFactory.createEntryManager(props);
}
示例7: decryptProperties
import org.xdi.util.security.PropertiesDecrypter; //导入方法依赖的package包/类
public Properties decryptProperties(Properties connectionProperties) {
return PropertiesDecrypter.decryptProperties(stringEncrypter, connectionProperties);
}