The credential-verification surface a lock UI (and the lock state machine) drives.
More...
#include <PhosphorServiceLock/IAuthenticator.h>
|
| void | succeeded () |
| | The credentials were accepted.
|
| void | failed (const QString &reason) |
| | The credentials were rejected (or the attempt could not complete); reason is a human-readable, non-sensitive explanation.
|
The credential-verification surface a lock UI (and the lock state machine) drives.
Verifies a password for a user and reports the outcome asynchronously. The production implementation is PamAuthenticator; tests and the state machine can substitute a fake, so the lock policy is exercisable without a real PAM stack or valid credentials.
◆ IAuthenticator()
| PhosphorServiceLock::IAuthenticator::IAuthenticator |
( |
QObject * | parent = nullptr | ) |
|
|
inlineexplicit |
◆ ~IAuthenticator()
| PhosphorServiceLock::IAuthenticator::~IAuthenticator |
( |
| ) |
|
|
override |
◆ authenticate()
| virtual void PhosphorServiceLock::IAuthenticator::authenticate |
( |
const QString & | username, |
|
|
const QString & | password ) |
|
pure virtual |
Asynchronously verify password for username.
Contract: every authenticate() MUST eventually emit exactly one succeeded or failed. The check runs off the GUI thread so a slow authentication stack never blocks the event loop, and the result signal is delivered on the GUI thread. Implementations should reject (as a failed) a call made while a previous one is still outstanding rather than run two transactions concurrently.
Implemented in PhosphorServiceLock::PamAuthenticator.
◆ failed
| void PhosphorServiceLock::IAuthenticator::failed |
( |
const QString & | reason | ) |
|
|
signal |
The credentials were rejected (or the attempt could not complete); reason is a human-readable, non-sensitive explanation.
◆ succeeded
| void PhosphorServiceLock::IAuthenticator::succeeded |
( |
| ) |
|
|
signal |
The credentials were accepted.
The documentation for this class was generated from the following file: