Example #1
0
  @Override
  public void init() throws Exception {
    Utils.validateNotEmpty(auth_url, "auth_url");
    Utils.validateNotEmpty(auth_type, "auth_type");
    Utils.validateNotEmpty(username, "username");
    Utils.validateNotEmpty(password, "password");
    Utils.validateNotEmpty(container, "container");

    Authenticator authenticator = createAuthenticator();
    authenticator.validateParams();

    swiftClient = new SwiftClient(authenticator);
    // Authenticate now to record credential
    swiftClient.authenticate();

    super.init();
  }
Example #2
0
 /**
  * Authenticate
  *
  * @throws Exception
  */
 public void authenticate() throws Exception {
   credentials = authenticator.authenticate();
 }