Proxy: pass database name in console too

This commit is contained in:
Stas Kelvich
2021-10-01 14:27:52 +03:00
parent 287ea2e5e3
commit cf8e27a554
2 changed files with 3 additions and 0 deletions

View File

@@ -36,12 +36,14 @@ impl CPlaneApi {
pub fn authenticate_proxy_request(
&self,
user: &str,
database: &str,
md5_response: &[u8],
salt: &[u8; 4],
) -> Result<DatabaseInfo> {
let mut url = reqwest::Url::parse(self.auth_endpoint)?;
url.query_pairs_mut()
.append_pair("login", user)
.append_pair("database", database)
.append_pair("md5response", std::str::from_utf8(md5_response)?)
.append_pair("salt", &hex::encode(salt));

View File

@@ -176,6 +176,7 @@ impl ProxyConnection {
match self.cplane.authenticate_proxy_request(
self.user.as_str(),
self.database.as_str(),
md5_response,
&self.md5_salt,
) {