当前位置: 首页>>代码示例>>Java>>正文


Java AccountConfig.setDisableSslValidation方法代码示例

本文整理汇总了Java中org.javaswift.joss.client.factory.AccountConfig.setDisableSslValidation方法的典型用法代码示例。如果您正苦于以下问题:Java AccountConfig.setDisableSslValidation方法的具体用法?Java AccountConfig.setDisableSslValidation怎么用?Java AccountConfig.setDisableSslValidation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.javaswift.joss.client.factory.AccountConfig的用法示例。


在下文中一共展示了AccountConfig.setDisableSslValidation方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ViPRSwiftClient

import org.javaswift.joss.client.factory.AccountConfig; //导入方法依赖的package包/类
public static Account ViPRSwiftClient(String username,String password,String dataNode)throws Exception
{
	try {
		AccountConfig config = new AccountConfig();
		config.setUsername(username);
		config.setPassword(password);
		config.setAuthUrl(dataNode + "/v2.0/tokens");
		config.setDisableSslValidation(true);
		Account account = new AccountFactory(config).createAccount();
		return account;
	} catch (Exception e) {
		System.out.println("error during creating connection with " + dataNode);
		e.printStackTrace();
	}
	return null;
}
 
开发者ID:thecodeteam,项目名称:VStriker,代码行数:17,代码来源:swiftapi.java

示例2: getHubicAccountConfig

import org.javaswift.joss.client.factory.AccountConfig; //导入方法依赖的package包/类
public static AccountConfig getHubicAccountConfig (final SwiftAccess sa)
{
    AccountConfig accConf = new AccountConfig () ;
    accConf.setDisableSslValidation(false);
    accConf.setAuthenticationMethod(AuthenticationMethod.EXTERNAL);
    accConf.setMock(false);
    accConf.setAllowReauthenticate(true);
    accConf.setAllowCaching(true) ;
    accConf.setAccessProvider (getHubicAccessProvider (sa)) ;
    return accConf ;
}
 
开发者ID:roikku,项目名称:swift-explorer,代码行数:12,代码来源:AccountConfigFactory.java

示例3: getKeystoneAccountConfig

import org.javaswift.joss.client.factory.AccountConfig; //导入方法依赖的package包/类
public static AccountConfig getKeystoneAccountConfig ()
{
    AccountConfig accConf = new AccountConfig () ;
    accConf.setDisableSslValidation(false);
    accConf.setAuthenticationMethod(AuthenticationMethod.KEYSTONE);
    accConf.setMock(false);
    accConf.setAllowReauthenticate(true);
    accConf.setAllowCaching(true) ;
    return accConf ;
}
 
开发者ID:roikku,项目名称:swift-explorer,代码行数:11,代码来源:AccountConfigFactory.java

示例4: ViPRSwiftClient

import org.javaswift.joss.client.factory.AccountConfig; //导入方法依赖的package包/类
public static Account ViPRSwiftClient(String username,String password,String dataNode)throws Exception
{
	
	   AccountConfig config = new AccountConfig();  
	              config.setUsername(username);  
	               config.setPassword(password);  
	               config.setAuthUrl(dataNode + "/v2.0/tokens");  
	               config.setDisableSslValidation(true);  
	               Account account = new AccountFactory(config).createAccount();  
	   return account;
	
}
 
开发者ID:thecodeteam,项目名称:VStriker,代码行数:13,代码来源:swiftapi.java

示例5: authenticate

import org.javaswift.joss.client.factory.AccountConfig; //导入方法依赖的package包/类
@Override
public boolean authenticate(Map<String, String> parameters) {
    this.parameters = parameters;        
    Credentials cred = new Credentials();
    
    if (!hasValidCredentials()){
        cred.removeCredentials("openstack");
        return false;
    }
           
    try {
        AccountConfig config = new AccountConfig();

        config.setUsername(parameters.get(USER_NAME));
        config.setPassword(parameters.get(PASSWORD));
        config.setAuthUrl(parameters.get(AUTH_URL)); //+ "/auth/v1.0");
        config.setDisableSslValidation(true);
        config.setAuthenticationMethod(AuthenticationMethod.BASIC);

        Account account = new AccountFactory(config).createAccount();

        this.container = account.getContainer("mainContainer");

        if (!this.container.exists()) {
            this.container.create();
            this.container.makePublic();//TODO - Maybe this is not necessary
            System.out.println("Container " + this.container.getName() + " created");
        }
        
        this.segmentContainer = account.getContainer("segments");
        
        if (!this.segmentContainer.exists()) {
            this.segmentContainer.create();                
        }
    
        //Remove old credentials, if they exist
        cred.removeCredentials("openstack");

        //Save new credentials
        String keys = parameters.get(USER_NAME) + "@" + parameters.get(PASSWORD) + "@" + parameters.get(AUTH_URL);
        cred.saveCredentials("openstack", keys);
        
    } catch (Exception ex) {
        return false;
    }
    updateCredentials();                
    this.isAuthenticated = true;
    return true;
}
 
开发者ID:modcs,项目名称:caboclo,代码行数:50,代码来源:OpenStackClient.java


注:本文中的org.javaswift.joss.client.factory.AccountConfig.setDisableSslValidation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。