Store encrypted passwords with connections.
Closes #22 as encrypted password is now deleted as part of the connection record.
This commit is contained in:
parent
e5ae9663c4
commit
d489f11e52
11 changed files with 252 additions and 695 deletions
|
|
@ -268,19 +268,6 @@ const char * const * ConnectionConfig::getValues() const
|
|||
return m_values.data();
|
||||
}
|
||||
|
||||
PasswordState ConnectionConfig::passwordState() const
|
||||
{
|
||||
return m_passwordState;
|
||||
}
|
||||
|
||||
void ConnectionConfig::setPasswordState(PasswordState password_state)
|
||||
{
|
||||
if (m_passwordState != password_state) {
|
||||
m_dirty = true;
|
||||
m_passwordState = password_state;
|
||||
}
|
||||
}
|
||||
|
||||
bool ConnectionConfig::isSameDatabase(const ConnectionConfig &rhs) const
|
||||
{
|
||||
return m_host == rhs.m_host
|
||||
|
|
@ -316,10 +303,21 @@ QString ConnectionConfig::makeLongDescription() const
|
|||
return stdStrToQ(result);
|
||||
}
|
||||
|
||||
/*
|
||||
std::string ConnectionConfig::encodedPassword() const
|
||||
{
|
||||
return m_encodedPassword;
|
||||
}
|
||||
|
||||
PGHOST behaves the same as the host connection parameter.
|
||||
PGHOSTADDR behaves the same as the hostaddr connection parameter. This can be set instead of or in addition to PGHOST to avoid DNS lookup overhead.
|
||||
void ConnectionConfig::setEncodedPassword(const std::string &encodedPassword)
|
||||
{
|
||||
m_dirty = true;
|
||||
m_encodedPassword = encodedPassword;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
PGHOST behaves the same as the host connection parameter.
|
||||
PGHOSTADDR behaves the same as the hostaddr connection parameter. This can be set instead of or in addition to PGHOST to avoid DNS lookup overhead.
|
||||
PGPORT behaves the same as the port connection parameter.
|
||||
PGDATABASE behaves the same as the dbname connection parameter.
|
||||
PGUSER behaves the same as the user connection parameter.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue