micro/auth/service/proto/auth.proto
Asim Aslam 6aaaf54275
add MICRO_AUTH_TOKEN, parse token in wrapper, preload config and othe… (#1261)
* add MICRO_AUTH_TOKEN, parse token in wrapper, preload config and other things

* fix wrapper panic
2020-02-25 22:15:44 +00:00

51 lines
789 B
Protocol Buffer

syntax = "proto3";
package go.micro.auth;
service Auth {
rpc Generate(GenerateRequest) returns (GenerateResponse) {};
rpc Verify(VerifyRequest) returns (VerifyResponse) {};
rpc Revoke(RevokeRequest) returns (RevokeResponse) {};
}
message Account{
string id = 1;
string token = 2;
int64 created = 3;
int64 expiry = 4;
repeated Role roles = 5;
map<string, string> metadata = 6;
}
message Role {
string name = 1;
Resource resource = 2;
}
message Resource{
string name = 1;
string type = 2;
}
message GenerateRequest {
Account account = 1;
}
message GenerateResponse {
Account account = 1;
}
message VerifyRequest {
string token = 1;
}
message VerifyResponse {
Account account = 1;
}
message RevokeRequest {
string token = 1;
}
message RevokeResponse {}