File indexing completed on 2024-11-24 04:44:41
0001 /* 0002 * SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org> 0003 * SPDX-License-Identifier: LGPL-2.0-or-later 0004 */ 0005 0006 #ifndef JWTPARSER_P_H 0007 #define JWTPARSER_P_H 0008 0009 #include "khealthcertificate.h" 0010 0011 #include <QJsonObject> 0012 0013 /** Decoding of JSON Web Tokens (JWT). */ 0014 class JwtParser 0015 { 0016 public: 0017 JwtParser(); 0018 ~JwtParser(); 0019 0020 void parse(const QByteArray &data); 0021 0022 QJsonObject payload() const; 0023 KHealthCertificate::SignatureValidation signatureState() const; 0024 0025 private: 0026 QJsonObject m_payload; 0027 KHealthCertificate::SignatureValidation m_signatureState = KHealthCertificate::InvalidSignature; 0028 }; 0029 0030 #endif // JWTPARSER_P_H