Skip to content

Instantly share code, notes, and snippets.

@jesusjavierdediego
Created February 19, 2021 15:43
Show Gist options
  • Save jesusjavierdediego/6c251de943a1e335ea35fd1bc9d9f010 to your computer and use it in GitHub Desktop.
Save jesusjavierdediego/6c251de943a1e335ea35fd1bc9d9f010 to your computer and use it in GitHub Desktop.
syntax = "proto3";
package idrproto;
option go_package = "protobuf";
option optimize_for = SPEED;
message IDR {
ID user_id = 1;
string purpose = 2;
string context = 3;
string business_id = 4;
string authtoken = 5;
}
message ID {
string piiid = 6;
string complete_name = 7;
string aad_user_name = 8;
string entity_id = 9;
string entity_name = 10;
string address = 11;
string postcode = 12;
string city = 13;
string province = 14;
string country = 15;
}
message IDRes {
ID user_id = 16;
string result = 17;
Pack pack = 18;
}
message Pack {
int64 expiry_time = 19;
bytes certificate = 20;
PK private_key = 21;
}
message PK {
string secret = 22;
bytes key = 23;
bytes pfx = 24;
string kty = 25;
repeated string purposes = 26;
}
message Empty {}
service DigitalIdentityService {
rpc RegisterNewDID(IDR) returns (Empty){}
rpc GetDID(IDR) returns (IDRes){}
rpc CompleteRevokeDID(IDR) returns (Empty){}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment