File indexing completed on 2024-12-22 04:56:59
0001 /* 0002 SPDX-FileCopyrightText: 2018 Krzysztof Nowicki <krissn@op.pl> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 #pragma once 0007 0008 #include "ewsabstractauth.h" 0009 0010 class EwsPasswordAuth : public EwsAbstractAuth 0011 { 0012 Q_OBJECT 0013 public: 0014 explicit EwsPasswordAuth(const QString &username, QObject *parent = nullptr); 0015 ~EwsPasswordAuth() override = default; 0016 0017 void init() override; 0018 bool getAuthData(QString &username, QString &password, QStringList &customHeaders) override; 0019 void notifyRequestAuthFailed() override; 0020 bool authenticate(bool interactive) override; 0021 const QString &reauthPrompt() const override; 0022 const QString &authFailedPrompt() const override; 0023 0024 void walletPasswordRequestFinished(const QString &password) override; 0025 void walletMapRequestFinished(const QMap<QString, QString> &map) override; 0026 0027 void setUsername(const QString &username); 0028 0029 protected: 0030 QString mUsername; 0031 QString mPassword; 0032 };