Add remove user function in basicauthmiddleware
This commit is contained in:
@@ -61,6 +61,7 @@ public:
|
||||
* with the new one provided.
|
||||
*/
|
||||
void add(const QString &username, const QString &password);
|
||||
void remove(const QString &username);
|
||||
|
||||
/**
|
||||
* @brief Process the request
|
||||
|
||||
@@ -46,6 +46,11 @@ void BasicAuthMiddleware::add(const QString &username, const QString &password)
|
||||
d->map.insert(username, password);
|
||||
}
|
||||
|
||||
void BasicAuthMiddleware::remove(const QString &username)
|
||||
{
|
||||
d->map.remove(username);
|
||||
}
|
||||
|
||||
bool BasicAuthMiddleware::verify(const QString &username, const QString &password)
|
||||
{
|
||||
return d->map.contains(username) && d->map.value(username) == password;
|
||||
|
||||
Reference in New Issue
Block a user