164 lines
2.9 KiB
Protocol Buffer
164 lines
2.9 KiB
Protocol Buffer
syntax = "proto3";
|
|
package authentication;
|
|
|
|
option go_package = "../gmproto";
|
|
|
|
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;
|
|
BrowserType browserType = 2;
|
|
string OS = 3;
|
|
DeviceType deviceType = 6;
|
|
}
|
|
|
|
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 {
|
|
AuthMessage authMessage = 1;
|
|
BrowserDetails browserDetails = 3;
|
|
|
|
oneof data {
|
|
KeyData keyData = 4;
|
|
CurrentDeviceData deviceData = 5;
|
|
}
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
message ECDSAKeys {
|
|
int64 field1 = 1; // idk?
|
|
bytes encryptedKeys = 2;
|
|
}
|
|
|
|
message CurrentDeviceData {
|
|
authentication.Device browser = 1;
|
|
}
|
|
|
|
message KeyData {
|
|
Device mobile = 1;
|
|
ECDSAKeys ecdsaKeys = 6;
|
|
WebAuthKey webAuthKeyData = 2;
|
|
Device browser = 3;
|
|
}
|
|
|
|
message WebAuthKey {
|
|
bytes webAuthKey = 1;
|
|
int64 validFor = 2;
|
|
}
|
|
|
|
message URLData {
|
|
bytes pairingKey = 1;
|
|
bytes AESKey = 2;
|
|
bytes HMACKey = 3;
|
|
}
|
|
|
|
message TokenData {
|
|
bytes tachyonAuthToken = 1;
|
|
int64 TTL = 2;
|
|
}
|
|
|
|
message PairedData {
|
|
Device mobile = 1;
|
|
TokenData tokenData = 2;
|
|
Device browser = 3;
|
|
}
|
|
|
|
message RevokePairData {
|
|
Device revokedDevice = 1;
|
|
}
|