Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
PamAuthenticator.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 fuddlesworth
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
7#include <PhosphorServiceLock/phosphorservicelock_export.h>
8
9#include <QString>
10
11#include <memory>
12
13namespace PhosphorServiceLock {
14
30class PHOSPHORSERVICELOCK_EXPORT PamAuthenticator : public IAuthenticator
31{
32 Q_OBJECT
33 Q_DISABLE_COPY_MOVE(PamAuthenticator)
34
35public:
36 explicit PamAuthenticator(QString service = QStringLiteral("login"), QObject* parent = nullptr);
38
41 [[nodiscard]] QString service() const;
42
43 void authenticate(const QString& username, const QString& password) override;
44
45private:
46 class Private;
47 std::unique_ptr<Private> d;
48};
49
50} // namespace PhosphorServiceLock
IAuthenticator(QObject *parent=nullptr)
Definition IAuthenticator.h:27
PamAuthenticator(QString service=QStringLiteral("login"), QObject *parent=nullptr)
void authenticate(const QString &username, const QString &password) override
Asynchronously verify password for username.
QString service() const
The PAM service name (the /etc/pam.d/<service> stack) this authenticator validates against.
Definition IAuthenticator.h:11