// +bili:type=service // Code generated by warden. syntax = "proto3"; package passport.service.identify.v1; option go_package = "v1"; option (gogoproto.goproto_stringer_all) = false; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; // CookieReq request param for rpc CookieInfo message GetCookieInfoReq { // all user cookie of HTTP request // example: 'SESSDATA=DEE4597D836A5A9DA29DFC1AB1EFFDEB;sid=exampleSID' string cookie = 1; } // CookieReply reply val for rpc CookieInfo message GetCookieInfoReply { // 用户是否登录 bool is_login = 1 [(gogoproto.jsontag) = "is_login"]; // user mid int64 mid = 2 [(gogoproto.jsontag) = "mid"]; // cookie csrf // when token reqest this field is empty string csrf = 3 [(gogoproto.jsontag) = "csrfToken"]; // expire time(unix timestamp) int32 expires = 4 [(gogoproto.jsontag) = "expires"]; } // TokenReq request param for rpc TokenInfo message GetTokenInfoReq { // user access token string token = 1 [(gogoproto.moretags) = "form:\"access_key\" validate:\"required\""]; // buvid string buvid = 2 [(gogoproto.moretags) = "form:\"buvid\""]; } // TokenReply reply val for rpc TokenInfo message GetTokenInfoReply { // 用户是否登录 bool is_login = 1 [(gogoproto.jsontag) = "is_login"]; // user mid int64 mid = 2 [(gogoproto.jsontag) = "mid"]; // cookie csrf // when token reqest this field is empty string csrf = 3 [(gogoproto.jsontag) = "csrfToken"]; // expire time(unix timestamp) int32 expires = 4 [(gogoproto.jsontag) = "expires"]; } service Identify { // CookieInfo identify info by cookie. rpc GetCookieInfo (GetCookieInfoReq) returns (GetCookieInfoReply); // TokenInfo identify info by token. rpc GetTokenInfo (GetTokenInfoReq) returns (GetTokenInfoReply); }