1 /*
2     SPDX-FileCopyrightText: 2007 Nicolas Ternisien <nicolas.ternisien@gmail.com>
3 
4     SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #include "authenticationConfiguration.h"
8 
AuthenticationConfiguration()9 AuthenticationConfiguration::AuthenticationConfiguration()
10 {
11     mConfiguration->setCurrentGroup(QStringLiteral("AuthenticationLogMode"));
12 
13     const QString defaultAuthenticationPath{QStringLiteral("/var/log/auth.log")};
14     mConfiguration->addItemString(QStringLiteral("LogFilePath"), mAuthenticationPath, defaultAuthenticationPath, QStringLiteral("LogFilePath"));
15 
16     const QStringList defaultWarningKeywords{QStringLiteral("failed")};
17     mConfiguration->addItemStringList(QStringLiteral("WarningKeywords"), mWarningKeywords, defaultWarningKeywords, QStringLiteral("WarningKeywords"));
18 
19     const QStringList defaultErrorKeywords{QStringLiteral("error")};
20     mConfiguration->addItemStringList(QStringLiteral("ErrorKeywords"), mErrorKeywords, defaultErrorKeywords, QStringLiteral("ErrorKeywords"));
21 }
22 
~AuthenticationConfiguration()23 AuthenticationConfiguration::~AuthenticationConfiguration()
24 {
25 }
26 
authenticationPath() const27 QString AuthenticationConfiguration::authenticationPath() const
28 {
29     return mAuthenticationPath;
30 }
31 
setAuthenticationPath(const QString & authenticationPath)32 void AuthenticationConfiguration::setAuthenticationPath(const QString &authenticationPath)
33 {
34     mAuthenticationPath = authenticationPath;
35 }
36 
warningKeywords() const37 QStringList AuthenticationConfiguration::warningKeywords() const
38 {
39     return mWarningKeywords;
40 }
41 
errorKeywords() const42 QStringList AuthenticationConfiguration::errorKeywords() const
43 {
44     return mErrorKeywords;
45 }
46