X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fsqlauthenticator.cpp;h=b06e230bfdd607bde6d31f0472e9d422626d6bf8;hp=fe8fffcb9ecb21881964595b300f1966506d96fe;hb=cc6e7c08709c4e761e2fd9c2e322751015497003;hpb=61aac1868f15babb7086d8bc6bbcff530346f438 diff --git a/src/core/sqlauthenticator.cpp b/src/core/sqlauthenticator.cpp index fe8fffcb..b06e230b 100644 --- a/src/core/sqlauthenticator.cpp +++ b/src/core/sqlauthenticator.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2019 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -20,57 +20,61 @@ #include "sqlauthenticator.h" -#include "logger.h" +#include "core.h" #include "network.h" #include "quassel.h" -#include "core.h" - -SqlAuthenticator::SqlAuthenticator(QObject *parent) +SqlAuthenticator::SqlAuthenticator(QObject* parent) : Authenticator(parent) -{ -} - - -SqlAuthenticator::~SqlAuthenticator() -{ -} +{} bool SqlAuthenticator::isAvailable() const { - // XXX: probably this should query the current storage (see the ::init routine too). + // FIXME: probably this should query the current storage (see the ::init routine too). return true; } -QString SqlAuthenticator::displayName() const +QString SqlAuthenticator::backendId() const { - // We identify the backend to use for the monolithic core by its displayname. + // We identify the backend to use for the monolithic core by this identifier. // so only change this string if you _really_ have to and make sure the core // setup for the mono client still works ;) return QString("Database"); } +QString SqlAuthenticator::displayName() const +{ + return tr("Database"); +} + QString SqlAuthenticator::description() const { - return tr("Do not auth against any remote authentication service, but instead save a hashed and salted password " - "in the selected database."); + return tr("Do not authenticate against any remote service, but instead save a hashed and salted password " + "in the database selected in the next step."); } -UserId SqlAuthenticator::validateUser(const QString &user, const QString &password) +UserId SqlAuthenticator::validateUser(const QString& user, const QString& password) { return Core::validateUser(user, password); } -bool SqlAuthenticator::setup(const QVariantMap &settings) +bool SqlAuthenticator::setup(const QVariantMap& settings, const QProcessEnvironment& environment, bool loadFromEnvironment) { - return true; + Q_UNUSED(settings) + Q_UNUSED(environment) + Q_UNUSED(loadFromEnvironment) + return true; } -Authenticator::State SqlAuthenticator::init(const QVariantMap &settings) +Authenticator::State SqlAuthenticator::init(const QVariantMap& settings, const QProcessEnvironment& environment, bool loadFromEnvironment) { - // TODO: FIXME: this should check if the storage provider is ready, but I don't - // know if there's an exposed way to do that at the moment. - - quInfo() << qPrintable(displayName()) << "Authenticator is ready."; - return IsReady; -} \ No newline at end of file + Q_UNUSED(settings) + Q_UNUSED(environment) + Q_UNUSED(loadFromEnvironment) + + // TODO: FIXME: this should check if the storage provider is ready, but I don't + // know if there's an exposed way to do that at the moment. + + qInfo() << qPrintable(backendId()) << "authenticator is ready."; + return IsReady; +}