Esempio n. 1
0
void Connection::on_authenticate(const std::string& class_name) {
  if (protocol_version_ == 1) {
    send_credentials(class_name);
  } else {
    send_initial_auth_response(class_name);
  }
}
Esempio n. 2
0
void Connection::on_authenticate() {
  if (protocol_version_ == 1) {
    send_credentials();
  } else {
    send_initial_auth_response();
  }
}
Esempio n. 3
0
void Connection::send_credentials(const std::string& class_name) {
  ScopedPtr<V1Authenticator> v1_auth(config_.auth_provider()->new_authenticator_v1(host_, class_name));
  if (v1_auth) {
    V1Authenticator::Credentials credentials;
    v1_auth->get_credentials(&credentials);
    internal_write(new StartupHandler(this, new CredentialsRequest(credentials)));
  } else {
    send_initial_auth_response(class_name);
  }
}
Esempio n. 4
0
void Connection::send_credentials() {
  ScopedPtr<V1Authenticator> v1_auth(config_.auth_provider()->new_authenticator_v1(address_));
  if (v1_auth) {
    V1Authenticator::Credentials credentials;
    v1_auth->get_credentials(&credentials);
    write(new StartupHandler(this, new CredentialsRequest(credentials)));
  } else {
    send_initial_auth_response();
  }
}