X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fauthenticator.h;h=1e32cd510dee114bcd61355b86341a7ebf736178;hp=ebea4c94eafaddfe64e78e1dbc49bb061b4b665e;hb=c1cf157116de7fc3da96203aa6f03c38c7ebb650;hpb=30b159cb876a9495de42e9a3e70ca050516f0805 diff --git a/src/core/authenticator.h b/src/core/authenticator.h index ebea4c94..1e32cd51 100644 --- a/src/core/authenticator.h +++ b/src/core/authenticator.h @@ -28,21 +28,21 @@ #include "types.h" -class Authenticator : public QObject { - +class Authenticator : public QObject +{ Q_OBJECT public: using QObject::QObject; ~Authenticator() override = default; - enum State { + enum State + { IsReady, // ready to go NeedsSetup, // need basic setup (ask the user for input) NotAvailable // remove the authenticator backend from the list of avaliable authenticators. }; - public slots: // General @@ -82,22 +82,24 @@ public slots: * \param settings Hostname, port, username, password, ... * \return True if and only if the authenticator provider was initialized successfully. */ - virtual bool setup(const QVariantMap &settings = QVariantMap(), - const QProcessEnvironment &environment = {}, - bool loadFromEnvironment = false) = 0; + virtual bool setup(const QVariantMap& settings = QVariantMap(), + const QProcessEnvironment& environment = {}, + bool loadFromEnvironment = false) + = 0; //! Initialize the authenticator provider /** \param settings Hostname, port, username, password, ... * \return the State the authenticator backend is now in (see authenticator::State) */ - virtual State init(const QVariantMap &settings = QVariantMap(), - const QProcessEnvironment &environment = {}, - bool loadFromEnvironment = false) = 0; + virtual State init(const QVariantMap& settings = QVariantMap(), + const QProcessEnvironment& environment = {}, + bool loadFromEnvironment = false) + = 0; //! Validate a username with a given password. /** \param user The username to validate * \param password The user's alleged password * \return A valid UserId if the password matches the username; 0 else */ - virtual UserId validateUser(const QString &user, const QString &password) = 0; + virtual UserId validateUser(const QString& user, const QString& password) = 0; };