AusweisApp
 
Lade ...
Suche ...
Keine Treffer
StateGenericProviderCommunication.h
gehe zur Dokumentation dieser Datei
1
4
5#pragma once
6
7#include "AbstractState.h"
9#include "GlobalStatus.h"
10#include "context/AuthContext.h"
11
12#include <QByteArray>
13#include <QList>
14#include <QNetworkReply>
15#include <QSharedPointer>
16#include <QSslConfiguration>
17#include <QSslError>
18
19
20class test_StateGenericProviderCommunication;
21class test_StateGetSelfAuthenticationData;
22class test_StatePreparePersonalization;
23class test_StateGetSessionId;
24class test_StateGetChallenge;
25
26
27namespace governikus
28{
29
31 : public AbstractState
32 , public GenericContextContainer<AuthContext>
33{
34 Q_OBJECT
35 friend class ::test_StateGenericProviderCommunication;
36 friend class ::test_StateGetSelfAuthenticationData;
37 friend class ::test_StatePreparePersonalization;
38 friend class ::test_StateGetSessionId;
39 friend class ::test_StateGetChallenge;
40
41 private:
42 QSharedPointer<QNetworkReply> mReply;
43
44 protected:
45 explicit StateGenericProviderCommunication(const QSharedPointer<WorkflowContext>& pContext);
46
47 virtual void handleNetworkReply(const QByteArray& pContent) = 0;
48 virtual bool isLoggingAllowed();
49
50 private:
51 virtual void setProgress() const;
52 [[nodiscard]] virtual QUrl getRequestUrl() const = 0;
53 [[nodiscard]] virtual QByteArray getPayload() const
54 {
55 return QByteArray();
56 }
57
58
59 void run() override;
60 void reportCommunicationError(const GlobalStatus& pStatus, const FailureCode& pFailure);
61 void checkSslConnectionAndSaveCertificate(const QSslConfiguration& pSslConfiguration);
62
63 private Q_SLOTS:
64 void onSslErrors(const QList<QSslError>& pErrors);
65 void onSslHandshakeDone();
66 void onNetworkReply();
67
68 public:
69 void onExit(QEvent* pEvent) override;
70};
71
72} // namespace governikus
AbstractState(const QSharedPointer< WorkflowContext > &pContext)
Definition AbstractState.cpp:22
Definition FailureCode.h:21
GenericContextContainer(const QSharedPointer< WorkflowContext > &pContext)
Definition GenericContextContainer.h:27
Definition GlobalStatus.h:22
StateGenericProviderCommunication(const QSharedPointer< WorkflowContext > &pContext)
Definition StateGenericProviderCommunication.cpp:21
virtual void handleNetworkReply(const QByteArray &pContent)=0
void onExit(QEvent *pEvent) override
Definition StateGenericProviderCommunication.cpp:206
virtual bool isLoggingAllowed()
Definition StateGenericProviderCommunication.cpp:110
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:17