Added dummy files for credential data of passkeys.

This commit is contained in:
23rd
2025-11-30 06:52:38 +03:00
committed by John Preston
parent 4829c6d028
commit a31e384409
3 changed files with 95 additions and 0 deletions
@@ -0,0 +1,31 @@
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "data/data_passkey_deserialize.h"
namespace Data::Passkey {
std::optional<RegisterData> DeserializeRegisterData(
const QByteArray &jsonData) {
return std::nullopt;
}
std::string SerializeClientDataCreate(const QByteArray &challenge) {
return std::string();
}
std::string SerializeClientDataGet(const QByteArray &challenge) {
return std::string();
}
std::optional<LoginData> DeserializeLoginData(
const QByteArray &jsonData) {
return std::nullopt;
}
} // namespace Data::Passkey
@@ -0,0 +1,62 @@
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
namespace Data::Passkey {
struct RelyingParty {
QString id;
QString name;
};
struct User {
QByteArray id;
QString name;
QString displayName;
};
struct CredentialParameter {
QString type;
int alg = 0;
};
struct RegisterData {
RelyingParty rp;
User user;
QByteArray challenge;
std::vector<CredentialParameter> pubKeyCredParams;
int timeout = 60000;
};
struct Credential {
QByteArray id;
QString type;
};
struct LoginData {
QByteArray challenge;
QString rpId;
std::vector<Credential> allowCredentials;
QString userVerification;
int timeout = 60000;
};
[[nodiscard]] std::optional<RegisterData> DeserializeRegisterData(
const QByteArray &jsonData);
[[nodiscard]] std::optional<LoginData> DeserializeLoginData(
const QByteArray &jsonData);
[[nodiscard]] std::string SerializeClientDataCreate(
const QByteArray &challenge);
[[nodiscard]] std::string SerializeClientDataGet(
const QByteArray &challenge);
} // namespace Data::Passkey
+2
View File
@@ -97,6 +97,8 @@ PRIVATE
data/data_channel_earn.h
data/data_credits.h
data/data_credits_earn.h
data/data_passkey_deserialize.cpp
data/data_passkey_deserialize.h
data/data_peer_colors.h
data/data_premium_subscription_option.h
data/data_statistics_chart.cpp