AusweisApp
Lade ...
Suche ...
Keine Treffer
SelfAuthenticationData.h
gehe zur Dokumentation dieser Datei
1
9#pragma once
10
11#include "EnumHelper.h"
12
13#include <functional>
14
15#include <QCoreApplication>
16#include <QDateTime>
17#include <QJsonObject>
18#include <QJsonValue>
19#include <QList>
20#include <QMap>
21#include <QPair>
22#include <QSharedData>
23#include <QString>
24
25namespace governikus
26{
27
29 UNKNOWN /* used for parser only */,
30 ALLOWED,
33
35 UNKNOWN, /* used for parser only */
52 /* additional fields */
58
59
61{
62 public:
63 using OrderedSelfData = QList<QPair<QString, QString>>;
64
65 private:
66 class SelfData
67 : public QSharedData
68 {
69 Q_DECLARE_TR_FUNCTIONS(governikus::SelfData)
70
71 private:
72 bool parse(const QByteArray& pData);
73 bool parseOperationsAllowedByUser(const QJsonObject& pObject);
74 bool parsePersonalData(const QJsonObject& pObject);
75 void parseStructuredPlace(const QJsonObject& pObjectm, SelfAuthDataPermission pPermission);
76 bool tryToInsertChild(const QJsonValue& pValue, SelfAuthData pAuthData);
77 void add(OrderedSelfData& pSelfData, const QString& pGroupName, const QString& pGroupValue) const;
78 void addAddress(OrderedSelfData& pSelfData) const;
79 static QString formatDate(const QString& pDate);
80
81 public:
82 bool mValid;
83 const QDateTime mDateTime;
84 QMap<SelfAuthData, SelfAuthDataPermission> mOperationsAllowed;
85 QMap<SelfAuthData, QString> mSelfAuthData;
86
87 explicit SelfData(const QByteArray& pData);
88 QString getValue(SelfAuthData pData) const;
89 OrderedSelfData getOrderedSelfInfo() const;
90 };
91
93
94 public:
97
101 [[nodiscard]] bool isValid() const;
102 [[nodiscard]] QString getValue(SelfAuthData pData) const;
103 [[nodiscard]] const QDateTime& getDateTime() const;
104 [[nodiscard]] OrderedSelfData getOrderedSelfData() const;
105};
106
107} // namespace governikus
#define defineEnumType(enumName,...)
Definition EnumHelper.h:85
Definition SelfAuthenticationData.h:61
QList< QPair< QString, QString > > OrderedSelfData
Definition SelfAuthenticationData.h:63
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:17
UNKNOWN
Definition ResponseApdu.h:65
DateOfExpiry
Definition SelfAuthenticationData.h:38
RestrictedID
Definition SelfAuthenticationData.h:49
BirthName
Definition AccessRoleAndRight.h:77
GivenNames
Definition AccessRoleAndRight.h:84
IssuingState
Definition SelfAuthenticationData.h:37
PlaceOfResidenceCity
Definition SelfAuthenticationData.h:54
PlaceOfResidence
Definition SelfAuthenticationData.h:46
PlaceOfResidenceCountry
Definition SelfAuthenticationData.h:55
PlaceOfResidenceStreet
Definition SelfAuthenticationData.h:53
DateOfBirth
Definition AccessRoleAndRight.h:80
FamilyNames
Definition SelfAuthenticationData.h:40
ResidencePermitI
Definition AccessRoleAndRight.h:74
AcademicTitle
Definition SelfAuthenticationData.h:42
Nationality
Definition AccessRoleAndRight.h:78
PlaceOfResidenceZipCode
Definition SelfAuthenticationData.h:56
PlaceVerification
Definition SelfAuthenticationData.h:51
DocumentType
Definition AccessRoleAndRight.h:87
QSharedPointer< T > decodeObject(const QByteArray &pData, bool pLogging=true)
Template function for decoding an OpenSSL type from DER encoded QByteArray.
Definition ASN1TemplateUtil.h:114
ArtisticName
Definition AccessRoleAndRight.h:82
AgeVerification
Definition AccessRoleAndRight.h:91
PlaceOfBirth
Definition AccessRoleAndRight.h:79