Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: tokenserver/api/oauth_token_grant.pb.go

Issue 2986423002: tokenserver: Fix some mistakes in proto docs for new token grants feature. (Closed)
Patch Set: rebase Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tokenserver/api/oauth_token_grant.proto ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Code generated by protoc-gen-go. DO NOT EDIT. 1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: github.com/luci/luci-go/tokenserver/api/oauth_token_grant.proto 2 // source: github.com/luci/luci-go/tokenserver/api/oauth_token_grant.proto
3 3
4 package tokenserver 4 package tokenserver
5 5
6 import proto "github.com/golang/protobuf/proto" 6 import proto "github.com/golang/protobuf/proto"
7 import fmt "fmt" 7 import fmt "fmt"
8 import math "math" 8 import math "math"
9 import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" 9 import google_protobuf "github.com/golang/protobuf/ptypes/timestamp"
10 10
11 // Reference imports to suppress errors if they are not otherwise used. 11 // Reference imports to suppress errors if they are not otherwise used.
12 var _ = proto.Marshal 12 var _ = proto.Marshal
13 var _ = fmt.Errorf 13 var _ = fmt.Errorf
14 var _ = math.Inf 14 var _ = math.Inf
15 15
16 // OAuthTokenGrantBody contains the internal guts of an oauth token grant. 16 // OAuthTokenGrantBody contains the internal guts of an oauth token grant.
17 // 17 //
18 // It gets serialized, signed and stuffed into OAuthTokenGrantEnvelope, which 18 // It gets serialized, signed and stuffed into OAuthTokenGrantEnvelope, which
19 // then also gets serialized to get the final blob with the grant. This blob is 19 // then also gets serialized to get the final blob with the grant. This blob is
20 // then base64-encoded and returned to the caller of MintOAuthTokenGrant. 20 // then base64-encoded and returned to the caller of MintOAuthTokenGrant.
21 type OAuthTokenGrantBody struct { 21 type OAuthTokenGrantBody struct {
22 // Identifier of this token as generated by the token server. 22 // Identifier of this token as generated by the token server.
23 // 23 //
24 // Used for logging and tracking purposes. 24 // Used for logging and tracking purposes.
25 // 25 //
26 // TODO(vadimsh): It may later be used for revocation purposes. 26 // TODO(vadimsh): It may later be used for revocation purposes.
27 TokenId int64 `protobuf:"varint,1,opt,name=token_id,json=tokenId" json:" token_id,omitempty"` 27 TokenId int64 `protobuf:"varint,1,opt,name=token_id,json=tokenId" json:" token_id,omitempty"`
28 » // Service account identity the end user wants to act as. 28 » // Service account email the end user wants to act as.
29 » //
30 » // A string of the form "user:<email>".
31 ServiceAccount string `protobuf:"bytes,2,opt,name=service_account,json=s erviceAccount" json:"service_account,omitempty"` 29 ServiceAccount string `protobuf:"bytes,2,opt,name=service_account,json=s erviceAccount" json:"service_account,omitempty"`
32 // Who can pass this token to MintOAuthTokenViaGrant to get an OAuth tok en. 30 // Who can pass this token to MintOAuthTokenViaGrant to get an OAuth tok en.
33 // 31 //
34 // A string of the form "user:<email>". On Swarming, this is Swarming's own 32 // A string of the form "user:<email>". On Swarming, this is Swarming's own
35 // service account name. 33 // service account name.
36 Proxy string `protobuf:"bytes,3,opt,name=proxy" json:"proxy,omitempty"` 34 Proxy string `protobuf:"bytes,3,opt,name=proxy" json:"proxy,omitempty"`
37 // An end user that wants to act as the service account (perhaps indirec tly). 35 // An end user that wants to act as the service account (perhaps indirec tly).
38 // 36 //
39 // A string of the form "user:<email>". On Swarming, this is an identity of 37 // A string of the form "user:<email>". On Swarming, this is an identity of
40 // a user that posted the task. 38 // a user that posted the task.
41 // 39 //
42 » // This is informational field currently (not used in authorization chec ks). 40 » // Used by MintOAuthTokenViaGrant to recheck that the access is still al lowed.
43 EndUser string `protobuf:"bytes,4,opt,name=end_user,json=endUser" json:" end_user,omitempty"` 41 EndUser string `protobuf:"bytes,4,opt,name=end_user,json=endUser" json:" end_user,omitempty"`
44 // When the token was generated (and when it becomes valid). 42 // When the token was generated (and when it becomes valid).
45 IssuedAt *google_protobuf.Timestamp `protobuf:"bytes,5,opt,name=issued_a t,json=issuedAt" json:"issued_at,omitempty"` 43 IssuedAt *google_protobuf.Timestamp `protobuf:"bytes,5,opt,name=issued_a t,json=issuedAt" json:"issued_at,omitempty"`
46 // How long the token is considered valid (in seconds). 44 // How long the token is considered valid (in seconds).
47 // 45 //
48 // It may become invalid sooner if the token server policy changes and t he 46 // It may become invalid sooner if the token server policy changes and t he
49 // new policy doesn't allow this token. 47 // new policy doesn't allow this token.
50 ValidityDuration int64 `protobuf:"varint,6,opt,name=validity_duration,js on=validityDuration" json:"validity_duration,omitempty"` 48 ValidityDuration int64 `protobuf:"varint,6,opt,name=validity_duration,js on=validityDuration" json:"validity_duration,omitempty"`
51 } 49 }
52 50
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 0x1b, 0xf4, 0xa1, 0x62, 0xaf, 0x0a, 0x24, 0xbe, 0x43, 0x43, 0xae, 0x94, 0x01, 0x46, 0xa8, 0xf6, 157 0x1b, 0xf4, 0xa1, 0x62, 0xaf, 0x0a, 0x24, 0xbe, 0x43, 0x43, 0xae, 0x94, 0x01, 0x46, 0xa8, 0xf6,
160 0xbb, 0x73, 0x2f, 0x18, 0x2d, 0x67, 0xa1, 0x33, 0x08, 0x8f, 0x06, 0xe1, 0xf6, 0x68, 0x10, 0x0f, 158 0xbb, 0x73, 0x2f, 0x18, 0x2d, 0x67, 0xa1, 0x33, 0x08, 0x8f, 0x06, 0xe1, 0xf6, 0x68, 0x10, 0x0f,
161 0xdc, 0xf2, 0x4a, 0xe3, 0x0b, 0xf4, 0x7b, 0x4f, 0x4b, 0xce, 0xb8, 0x6e, 0x08, 0x33, 0x92, 0x6a, 159 0xdc, 0xf2, 0x4a, 0xe3, 0x0b, 0xf4, 0x7b, 0x4f, 0x4b, 0xce, 0xb8, 0x6e, 0x08, 0x33, 0x92, 0x6a,
162 0x2e, 0x2a, 0xbf, 0x67, 0x9f, 0x3d, 0x3d, 0x06, 0x8f, 0x07, 0xbe, 0x68, 0xd0, 0xff, 0x6f, 0xc6, 160 0x2e, 0x2a, 0xbf, 0x67, 0x9f, 0x3d, 0x3d, 0x06, 0x8f, 0x07, 0xbe, 0x68, 0xd0, 0xff, 0x6f, 0xc6,
163 0x4f, 0xd5, 0x1e, 0x4a, 0x51, 0x03, 0x3e, 0x45, 0xc8, 0x59, 0x27, 0x82, 0x35, 0xd6, 0x7b, 0x1c, 161 0x4f, 0xd5, 0x1e, 0x4a, 0x51, 0x03, 0x3e, 0x45, 0xc8, 0x59, 0x27, 0x82, 0x35, 0xd6, 0x7b, 0x1c,
164 0x0f, 0x2d, 0xb1, 0x47, 0xf9, 0x87, 0x7a, 0x05, 0x34, 0xed, 0x49, 0x9c, 0x70, 0xb7, 0x80, 0x66, 162 0x0f, 0x2d, 0xb1, 0x47, 0xf9, 0x87, 0x7a, 0x05, 0x34, 0xed, 0x49, 0x9c, 0x70, 0xb7, 0x80, 0x66,
165 0xcd, 0x70, 0x80, 0xa6, 0x75, 0x91, 0xaa, 0x2b, 0xa2, 0x72, 0xba, 0xbc, 0xb9, 0x25, 0x8a, 0x67, 163 0xcd, 0x70, 0x80, 0xa6, 0x75, 0x91, 0xaa, 0x2b, 0xa2, 0x72, 0xba, 0xbc, 0xb9, 0x25, 0x8a, 0x67,
166 0x56, 0x79, 0x1c, 0x4f, 0x2c, 0xdf, 0x58, 0xbc, 0xe1, 0x59, 0xd2, 0xb3, 0x16, 0xd7, 0x9f, 0x01, 164 0x56, 0x79, 0x1c, 0x4f, 0x2c, 0xdf, 0x58, 0xbc, 0xe1, 0x59, 0xd2, 0xb3, 0x16, 0xd7, 0x9f, 0x01,
167 0x00, 0x00, 0xff, 0xff, 0xd4, 0x1a, 0x4c, 0xb4, 0xe5, 0x01, 0x00, 0x00, 165 0x00, 0x00, 0xff, 0xff, 0xd4, 0x1a, 0x4c, 0xb4, 0xe5, 0x01, 0x00, 0x00,
168 } 166 }
OLDNEW
« no previous file with comments | « tokenserver/api/oauth_token_grant.proto ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698