|
reSIProcate/repro
9694
|
#include <UserStore.hxx>

Public Types | |
| typedef resip::Data | Key |
Public Member Functions | |
| UserStore (AbstractDb &db) | |
| virtual | ~UserStore () |
| AbstractDb::UserRecord | getUserInfo (const Key &key) const |
| resip::Data | getUserAuthInfo (const resip::Data &user, const resip::Data &realm) const |
| bool | addUser (const resip::Data &user, const resip::Data &domain, const resip::Data &realm, const resip::Data &password, bool applyA1HashToPassword, const resip::Data &fullName, const resip::Data &emailAddress) |
| void | eraseUser (const Key &key) |
| bool | updateUser (const Key &originalKey, const resip::Data &user, const resip::Data &domain, const resip::Data &realm, const resip::Data &password, bool applyA1HashToPassword, const resip::Data &fullName, const resip::Data &emailAddress) |
| Key | getFirstKey () |
| Key | getNextKey () |
Private Member Functions | |
| Key | buildKey (const resip::Data &user, const resip::Data &domain) const |
Private Attributes | |
| AbstractDb & | mDb |
Definition at line 20 of file UserStore.hxx.
| typedef resip::Data repro::UserStore::Key |
Definition at line 23 of file UserStore.hxx.
| UserStore::UserStore | ( | AbstractDb & | db | ) |
Definition at line 24 of file UserStore.cxx.
: mDb(db) { }
| UserStore::~UserStore | ( | ) | [virtual] |
Definition at line 29 of file UserStore.cxx.
{
}
| bool UserStore::addUser | ( | const resip::Data & | user, |
| const resip::Data & | domain, | ||
| const resip::Data & | realm, | ||
| const resip::Data & | password, | ||
| bool | applyA1HashToPassword, | ||
| const resip::Data & | fullName, | ||
| const resip::Data & | emailAddress | ||
| ) |
Definition at line 51 of file UserStore.cxx.
{
AbstractDb::UserRecord rec;
rec.user = username;
rec.domain = domain;
rec.realm = realm;
if(applyA1HashToPassword)
{
MD5Stream a1;
a1 << username
<< Symbols::COLON
<< realm
<< Symbols::COLON
<< password;
a1.flush();
rec.passwordHash = a1.getHex();
}
else
{
rec.passwordHash = password;
}
rec.name = fullName;
rec.email = emailAddress;
rec.forwardAddress = Data::Empty;
return mDb.addUser( buildKey(username,domain), rec);
}
| UserStore::Key UserStore::buildKey | ( | const resip::Data & | user, |
| const resip::Data & | domain | ||
| ) | const [private] |
Definition at line 128 of file UserStore.cxx.
| void UserStore::eraseUser | ( | const Key & | key | ) |
Definition at line 87 of file UserStore.cxx.
| UserStore::Key UserStore::getFirstKey | ( | ) |
Definition at line 114 of file UserStore.cxx.
{
return mDb.firstUserKey();
}
| UserStore::Key UserStore::getNextKey | ( | ) |
Definition at line 121 of file UserStore.cxx.
{
return mDb.nextUserKey();
}
| Data UserStore::getUserAuthInfo | ( | const resip::Data & | user, |
| const resip::Data & | realm | ||
| ) | const |
Definition at line 42 of file UserStore.cxx.
{
Key key = buildKey(user, realm);
return mDb.getUserAuthInfo( key );
}
| AbstractDb::UserRecord UserStore::getUserInfo | ( | const Key & | key | ) | const |
Definition at line 35 of file UserStore.cxx.
| bool UserStore::updateUser | ( | const Key & | originalKey, |
| const resip::Data & | user, | ||
| const resip::Data & | domain, | ||
| const resip::Data & | realm, | ||
| const resip::Data & | password, | ||
| bool | applyA1HashToPassword, | ||
| const resip::Data & | fullName, | ||
| const resip::Data & | emailAddress | ||
| ) |
AbstractDb& repro::UserStore::mDb [private] |
Definition at line 60 of file UserStore.hxx.
1.7.5.1