mirror of https://github.com/synctv-org/synctv
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
781 B
Protocol Buffer
36 lines
781 B
Protocol Buffer
syntax = "proto3";
|
|
option go_package = ".;providerpb";
|
|
|
|
package proto;
|
|
|
|
message InitReq {
|
|
string client_id = 1;
|
|
string client_secret = 2;
|
|
string redirect_url = 3;
|
|
}
|
|
|
|
message GetTokenReq { string code = 1; }
|
|
|
|
message RefreshTokenReq { string refresh_token = 1; }
|
|
|
|
message ProviderResp { string name = 1; }
|
|
|
|
message NewAuthURLReq { string state = 1; }
|
|
|
|
message NewAuthURLResp { string url = 1; }
|
|
|
|
message GetUserInfoReq { string code = 1; }
|
|
|
|
message GetUserInfoResp {
|
|
string username = 1;
|
|
string provider_user_id = 2;
|
|
}
|
|
|
|
message Enpty {}
|
|
|
|
service Oauth2Plugin {
|
|
rpc Init(InitReq) returns (Enpty) {}
|
|
rpc Provider(Enpty) returns (ProviderResp) {}
|
|
rpc NewAuthURL(NewAuthURLReq) returns (NewAuthURLResp) {}
|
|
rpc GetUserInfo(GetUserInfoReq) returns (GetUserInfoResp) {}
|
|
} |