X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fsqlauthenticator.cpp;h=b6984d2baa80f75b10c9bbdb01e2bb501964db43;hb=9f5f7f67cd4ccca7e6f922313aa0aa78246f7855;hp=e7f057b7bc55719eb5ca5bc2b6c118848f3439ad;hpb=4b0caf61565c8791efba283bbcaf73530b9feafc;p=quassel.git diff --git a/src/core/sqlauthenticator.cpp b/src/core/sqlauthenticator.cpp index e7f057b7..b6984d2b 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-2016 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -36,37 +36,49 @@ SqlAuthenticator::~SqlAuthenticator() { } + bool SqlAuthenticator::isAvailable() const { // FIXME: probably this should query the current storage (see the ::init routine too). return true; } + 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) { return Core::validateUser(user, password); } + bool SqlAuthenticator::setup(const QVariantMap &settings) { Q_UNUSED(settings) return true; } + Authenticator::State SqlAuthenticator::init(const QVariantMap &settings) { Q_UNUSED(settings) @@ -74,6 +86,6 @@ Authenticator::State SqlAuthenticator::init(const QVariantMap &settings) // 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(backendId()) << "Authenticator is ready."; + quInfo() << qPrintable(backendId()) << "authenticator is ready."; return IsReady; }