File indexing completed on 2024-05-12 05:48:36

0001 /*
0002     SPDX-FileCopyrightText: 2007 Nicolas Ternisien <nicolas.ternisien@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "authenticationConfiguration.h"
0008 
0009 AuthenticationConfiguration::AuthenticationConfiguration()
0010 {
0011     mConfiguration->setCurrentGroup(QStringLiteral("AuthenticationLogMode"));
0012 
0013     const QString defaultAuthenticationPath{QStringLiteral("/var/log/auth.log")};
0014     mConfiguration->addItemString(QStringLiteral("LogFilePath"), mAuthenticationPath, defaultAuthenticationPath, QStringLiteral("LogFilePath"));
0015 
0016     const QStringList defaultWarningKeywords{QStringLiteral("failed")};
0017     mConfiguration->addItemStringList(QStringLiteral("WarningKeywords"), mWarningKeywords, defaultWarningKeywords, QStringLiteral("WarningKeywords"));
0018 
0019     const QStringList defaultErrorKeywords{QStringLiteral("error")};
0020     mConfiguration->addItemStringList(QStringLiteral("ErrorKeywords"), mErrorKeywords, defaultErrorKeywords, QStringLiteral("ErrorKeywords"));
0021 }
0022 
0023 AuthenticationConfiguration::~AuthenticationConfiguration()
0024 {
0025 }
0026 
0027 QString AuthenticationConfiguration::authenticationPath() const
0028 {
0029     return mAuthenticationPath;
0030 }
0031 
0032 void AuthenticationConfiguration::setAuthenticationPath(const QString &authenticationPath)
0033 {
0034     mAuthenticationPath = authenticationPath;
0035 }
0036 
0037 QStringList AuthenticationConfiguration::warningKeywords() const
0038 {
0039     return mWarningKeywords;
0040 }
0041 
0042 QStringList AuthenticationConfiguration::errorKeywords() const
0043 {
0044     return mErrorKeywords;
0045 }
0046 
0047 #include "moc_authenticationConfiguration.cpp"