gmessages/libgm/gmproto/authentication.proto

176 lines
3.1 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
package authentication;
2023-07-17 13:51:31 +00:00
option go_package = "../gmproto";
2023-07-17 23:57:20 +00:00
import "util.proto";
enum BrowserType {
UNKNOWN_BROWSER_TYPE = 0;
OTHER = 1;
CHROME = 2;
FIREFOX = 3;
SAFARI = 4;
OPERA = 5;
IE = 6;
EDGE = 7;
}
enum DeviceType {
UNKNOWN_DEVICE_TYPE = 0;
WEB = 1;
TABLET = 2;
PWA = 3;
}
message BrowserDetails {
string userAgent = 1;
2023-07-17 23:57:20 +00:00
BrowserType browserType = 2;
2023-07-16 13:19:33 +00:00
string OS = 3;
DeviceType deviceType = 6;
}
2023-07-17 23:57:20 +00:00
message Device {
int64 userID = 1;
string sourceID = 2;
string network = 3;
}
message ConfigVersion {
int32 Year = 3;
int32 Month = 4;
int32 Day = 5;
int32 V1 = 7;
int32 V2 = 9;
}
message AuthenticationContainer {
2023-07-17 23:57:20 +00:00
AuthMessage authMessage = 1;
BrowserDetails browserDetails = 3;
oneof data {
KeyData keyData = 4;
CurrentDeviceData deviceData = 5;
}
}
2023-07-17 23:57:20 +00:00
message AuthMessage {
string requestID = 1;
optional string network = 3;
optional bytes tachyonAuthToken = 6;
ConfigVersion configVersion = 7;
}
message RevokeRelayPairingRequest {
AuthMessage authMessage = 1;
Device browser = 2;
}
message RevokeRelayPairingResponse {
// field 1 is an object with an unknown int64 in field 2
}
message RegisterRefreshRequest {
message NestedEmptyArr {
util.EmptyArr emptyArr = 9;
}
AuthMessage messageAuth = 1;
Device currBrowserDevice = 2;
int64 unixTimestamp = 3;
bytes signature = 4;
NestedEmptyArr emptyRefreshArr = 13;
int32 messageType = 16;
}
message RegisterRefreshResponse {
message AuthKeyData {
bytes tachyonAuthToken = 1;
string validFor = 2;
}
AuthKeyData tokenData = 2;
}
message RegisterPhoneRelayResponse {
message AuthKeyData {
bytes tachyonAuthToken = 1;
int64 validFor = 2;
}
CoordinateMessage coordinates = 1;
Device browser = 2;
bytes pairingKey = 3;
int64 validFor = 4;
AuthKeyData authKeyData = 5;
string responseID = 6;
}
message CoordinateMessage {
int64 coord1 = 2;
}
message RefreshPhoneRelayResponse {
CoordinateMessage coordinates = 1;
bytes pairKey = 2;
int64 validFor = 3;
}
message WebEncryptionKeyResponse {
CoordinateMessage coordinates = 1;
bytes key = 2;
}
2023-09-04 11:24:45 +00:00
message ErrorResponse {
int64 type = 1; // 5?
string message = 2;
repeated ErrorClass class = 3;
message ErrorClass {
string class = 1;
// 2: {1: 1}
}
}
message ECDSAKeys {
int64 field1 = 1; // idk?
bytes encryptedKeys = 2;
}
2023-07-17 23:57:20 +00:00
message CurrentDeviceData {
authentication.Device browser = 1;
}
message KeyData {
2023-07-17 23:57:20 +00:00
Device mobile = 1;
ECDSAKeys ecdsaKeys = 6;
WebAuthKey webAuthKeyData = 2;
2023-07-17 23:57:20 +00:00
Device browser = 3;
}
message WebAuthKey {
bytes webAuthKey = 1;
int64 validFor = 2;
}
2023-07-15 13:25:54 +00:00
message URLData {
bytes pairingKey = 1;
bytes AESKey = 2;
bytes HMACKey = 3;
}
message TokenData {
bytes tachyonAuthToken = 1;
int64 TTL = 2;
}
message PairedData {
2023-07-17 23:57:20 +00:00
Device mobile = 1;
TokenData tokenData = 2;
2023-07-17 23:57:20 +00:00
Device browser = 3;
}
message RevokePairData {
2023-07-17 23:57:20 +00:00
Device revokedDevice = 1;
}