KUnifiedPush

nextcloudauthenticator.h
1/*
2 SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org>
3 SPDX-License-Identifier: LGPL-2.0-or-later
4*/
5
6#ifndef NEXTCLOUDAUTHENTICATOR_H
7#define NEXTCLOUDAUTHENTICATOR_H
8
9#include <QObject>
10#include <QString>
11#include <QUrl>
12
14class QNetworkReply;
15
16/** Implementation of https://docs.nextcloud.com/server/latest/developer_manual/client_apis/LoginFlow/index.html#login-flow-v2. */
18{
20public:
21 explicit NextcloudAuthenticator(QObject *parent = nullptr);
23
24 void setNetworkAccessManager(QNetworkAccessManager *nam);
25 void authenticate(const QUrl &baseUrl, const QString &appName);
26
28 void authenticated(const QString &loginName, const QString &appPassword);
29
30private:
31 void post1Finished(QNetworkReply *reply);
32 void login2Poll();
33
34 QNetworkAccessManager *m_nam = nullptr;
35 QUrl m_pollEndpoint;
36 QByteArray m_pollToken;
37};
38
39#endif // NEXTCLOUDAUTHENTICATOR_H
Implementation of https://docs.nextcloud.com/server/latest/developer_manual/client_apis/LoginFlow/ind...
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 11:57:38 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.