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

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

Issue 2785973002: token-server: Add protos for new API for generating service account tokens. (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
(Empty)
1 // Code generated by protoc-gen-go.
2 // source: github.com/luci/luci-go/tokenserver/api/oauth_token_grant.proto
3 // DO NOT EDIT!
4
5 package tokenserver
6
7 import proto "github.com/golang/protobuf/proto"
8 import fmt "fmt"
9 import math "math"
10 import google_protobuf "github.com/golang/protobuf/ptypes/timestamp"
11
12 // Reference imports to suppress errors if they are not otherwise used.
13 var _ = proto.Marshal
14 var _ = fmt.Errorf
15 var _ = math.Inf
16
17 // OAuthTokenGrantBody contains the internal guts of an oauth token grant.
18 //
19 // It gets serialized, signed and stuffed into OAuthTokenGrantEnvelope, which
20 // then also gets serialized to get the final blob with the grant. This blob is
21 // then base64-encoded and returned to the caller of MintOAuthTokenGrant.
22 type OAuthTokenGrantBody struct {
23 // Identifier of this token as generated by the token server.
24 //
25 // Used for logging and tracking purposes.
26 //
27 // TODO(vadimsh): It may later be used for revocation purposes.
28 SubtokenId int64 `protobuf:"varint,1,opt,name=subtoken_id,json=subtokenI d" json:"subtoken_id,omitempty"`
29 // Service account identity the end user wants to act as.
30 //
31 // A string of the form "user:<email>".
32 ServiceAccount string `protobuf:"bytes,2,opt,name=service_account,json=s erviceAccount" json:"service_account,omitempty"`
33 // Who requested this token and who can pass it to MintOAuthTokenViaGran t.
34 //
35 // A string of the form "user:<email>". On Swarming, this is Swarming's own
36 // service account name.
37 WielderIdentity string `protobuf:"bytes,3,opt,name=wielder_identity,json =wielderIdentity" json:"wielder_identity,omitempty"`
38 // An end user that wants to act as the service account (perhaps indirec tly).
39 //
40 // A string of the form "user:<email>". On Swarming, this is an identity of
41 // a user that posted the task.
42 EndUserIdentity string `protobuf:"bytes,4,opt,name=end_user_identity,jso n=endUserIdentity" json:"end_user_identity,omitempty"`
43 // When the token was generated (and when it becomes valid).
44 IssuedAt *google_protobuf.Timestamp `protobuf:"bytes,5,opt,name=issued_a t,json=issuedAt" json:"issued_at,omitempty"`
45 // How long the token is considered valid (in seconds).
46 //
47 // It may become invalid sooner if the token server policy changes and t he
48 // new policy doesn't allow this token.
49 ValidityDuration int64 `protobuf:"varint,6,opt,name=validity_duration,js on=validityDuration" json:"validity_duration,omitempty"`
50 }
51
52 func (m *OAuthTokenGrantBody) Reset() { *m = OAuthTokenGrantB ody{} }
53 func (m *OAuthTokenGrantBody) String() string { return proto.CompactT extString(m) }
54 func (*OAuthTokenGrantBody) ProtoMessage() {}
55 func (*OAuthTokenGrantBody) Descriptor() ([]byte, []int) { return fileDescriptor 1, []int{0} }
56
57 func (m *OAuthTokenGrantBody) GetSubtokenId() int64 {
58 if m != nil {
59 return m.SubtokenId
60 }
61 return 0
62 }
63
64 func (m *OAuthTokenGrantBody) GetServiceAccount() string {
65 if m != nil {
66 return m.ServiceAccount
67 }
68 return ""
69 }
70
71 func (m *OAuthTokenGrantBody) GetWielderIdentity() string {
72 if m != nil {
73 return m.WielderIdentity
74 }
75 return ""
76 }
77
78 func (m *OAuthTokenGrantBody) GetEndUserIdentity() string {
79 if m != nil {
80 return m.EndUserIdentity
81 }
82 return ""
83 }
84
85 func (m *OAuthTokenGrantBody) GetIssuedAt() *google_protobuf.Timestamp {
86 if m != nil {
87 return m.IssuedAt
88 }
89 return nil
90 }
91
92 func (m *OAuthTokenGrantBody) GetValidityDuration() int64 {
93 if m != nil {
94 return m.ValidityDuration
95 }
96 return 0
97 }
98
99 // OAuthTokenGrantEnvelope is what is actually being serialized and send to
100 // the callers of MintOAuthTokenGrant (after being encoded using base64 standard
101 // raw encoding).
102 type OAuthTokenGrantEnvelope struct {
103 TokenBody []byte `protobuf:"bytes,1,opt,name=token_body,json=tokenB ody,proto3" json:"token_body,omitempty"`
104 KeyId string `protobuf:"bytes,2,opt,name=key_id,json=keyId" jso n:"key_id,omitempty"`
105 Pkcs1Sha256Sig []byte `protobuf:"bytes,3,opt,name=pkcs1_sha256_sig,json= pkcs1Sha256Sig,proto3" json:"pkcs1_sha256_sig,omitempty"`
106 }
107
108 func (m *OAuthTokenGrantEnvelope) Reset() { *m = OAuthTokenGr antEnvelope{} }
109 func (m *OAuthTokenGrantEnvelope) String() string { return proto.Comp actTextString(m) }
110 func (*OAuthTokenGrantEnvelope) ProtoMessage() {}
111 func (*OAuthTokenGrantEnvelope) Descriptor() ([]byte, []int) { return fileDescri ptor1, []int{1} }
112
113 func (m *OAuthTokenGrantEnvelope) GetTokenBody() []byte {
114 if m != nil {
115 return m.TokenBody
116 }
117 return nil
118 }
119
120 func (m *OAuthTokenGrantEnvelope) GetKeyId() string {
121 if m != nil {
122 return m.KeyId
123 }
124 return ""
125 }
126
127 func (m *OAuthTokenGrantEnvelope) GetPkcs1Sha256Sig() []byte {
128 if m != nil {
129 return m.Pkcs1Sha256Sig
130 }
131 return nil
132 }
133
134 func init() {
135 proto.RegisterType((*OAuthTokenGrantBody)(nil), "tokenserver.OAuthTokenG rantBody")
136 proto.RegisterType((*OAuthTokenGrantEnvelope)(nil), "tokenserver.OAuthTo kenGrantEnvelope")
137 }
138
139 func init() {
140 proto.RegisterFile("github.com/luci/luci-go/tokenserver/api/oauth_token_ grant.proto", fileDescriptor1)
141 }
142
143 var fileDescriptor1 = []byte{
144 // 361 bytes of a gzipped FileDescriptorProto
145 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0xcf, 0x6b, 0xdb, 0x30,
146 0x1c, 0x47, 0x71, 0xb2, 0x84, 0x45, 0x09, 0xf9, 0xa1, 0x31, 0x66, 0x02, 0x23, 0x21, 0x97, 0x79,
147 0x1b, 0xb3, 0x59, 0xc6, 0xb6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0x88, 0x51, 0xb7, 0xee, 0x1b, 0xe7, 0x82, 0x60,
159 0x0f, 0xea, 0xc6, 0xfd, 0x8d, 0x26, 0x5c, 0x29, 0x03, 0x8c, 0x50, 0xed, 0x8f, 0xb6, 0x5e, 0x30,
160 0xdd, 0xaf, 0x43, 0xb7, 0x36, 0xec, 0xd7, 0x86, 0xe7, 0x7e, 0x6d, 0xfc, 0xd6, 0xc9, 0x07, 0x8d,
161 0xbf, 0xa2, 0xd5, 0x95, 0x96, 0x9c, 0x71, 0xdd, 0x10, 0x66, 0x6a, 0xaa, 0xb9, 0x14, 0xfe, 0xd8,
162 0xee, 0x5b, 0xf6, 0x07, 0xff, 0x3a, 0xbe, 0x6b, 0xd0, 0x87, 0x57, 0x75, 0xfe, 0x8b, 0x2b, 0x94,
163 0xb2, 0x02, 0xfc, 0x11, 0x21, 0x97, 0x27, 0x91, 0xac, 0xb1, 0x81, 0x66, 0xf1, 0xc4, 0x12, 0x1b,
164 0xf0, 0x3d, 0x1a, 0x17, 0xd0, 0xb4, 0xed, 0x5c, 0x96, 0x51, 0x01, 0xcd, 0x91, 0xe1, 0x00, 0x2d,
165 0xab, 0x22, 0x55, 0xdf, 0x89, 0xca, 0xe9, 0xfe, 0xe7, 0x2f, 0xa2, 0x78, 0x66, 0x6b, 0xcc, 0xe2,
166 0xb9, 0xe5, 0x27, 0x8b, 0x4f, 0x3c, 0x4b, 0xc6, 0x76, 0xc5, 0x8f, 0x97, 0x00, 0x00, 0x00, 0xff,
167 0xff, 0xdb, 0x00, 0x73, 0xba, 0x11, 0x02, 0x00, 0x00,
168 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698