AusweisApp2
ProxyCredentials.h
gehe zur Dokumentation dieser Datei
1 
5 #pragma once
6 
7 #include <QAuthenticator>
8 #include <QEventLoop>
9 #include <QNetworkProxy>
10 
11 
12 namespace governikus
13 {
14 
16  : public QObject
17 {
18  Q_OBJECT
19 
20  Q_PROPERTY(QString proposedUser READ getProposedUser CONSTANT)
21  Q_PROPERTY(QString url READ getUrl CONSTANT)
22  Q_PROPERTY(QString user READ getUser WRITE setUser NOTIFY fireProxyCredentialsChanged)
23  Q_PROPERTY(QString password READ getPassword WRITE setPassword NOTIFY fireProxyCredentialsChanged)
24 
25  private:
26  QEventLoop mLoop;
27  QAuthenticator* mAuthenticator;
28  const QString mProposedUser;
29  const QString mUrl;
30 
31  [[nodiscard]] QString createUrl(const QNetworkProxy& pProxy) const;
32 
33  public:
34  ProxyCredentials(const QNetworkProxy& pProxy, QAuthenticator* pAuthenticator);
35 
36  [[nodiscard]] QString getProposedUser() const;
37  [[nodiscard]] QString getUrl() const;
38 
39  [[nodiscard]] QString getUser() const;
40  void setUser(const QString& pUser);
41 
42  [[nodiscard]] QString getPassword() const;
43  void setPassword(const QString& pPassword);
44 
45  Q_INVOKABLE void confirmInput();
46  void waitForConfirmation();
47 
48  Q_SIGNALS:
50 };
51 
52 
53 } // namespace governikus
Definition: ProxyCredentials.h:17
QString user
Definition: ProxyCredentials.h:22
QString password
Definition: ProxyCredentials.h:23
QString proposedUser
Definition: ProxyCredentials.h:20
QString getProposedUser() const
Definition: ProxyCredentials.cpp:44
void setPassword(const QString &pPassword)
Definition: ProxyCredentials.cpp:88
void setUser(const QString &pUser)
Definition: ProxyCredentials.cpp:67
ProxyCredentials(const QNetworkProxy &pProxy, QAuthenticator *pAuthenticator)
Definition: ProxyCredentials.cpp:34
Q_INVOKABLE void confirmInput()
Definition: ProxyCredentials.cpp:98
QString getPassword() const
Definition: ProxyCredentials.cpp:77
QString getUser() const
Definition: ProxyCredentials.cpp:56
QString url
Definition: ProxyCredentials.h:21
void waitForConfirmation()
Definition: ProxyCredentials.cpp:104
QString getUrl() const
Definition: ProxyCredentials.cpp:50
Implementation of GeneralAuthenticate response APDUs.
Definition: CommandApdu.h:16