mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Added dummy files for credential data of passkeys.
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user