diff options
author | Dave Borowitz <dborowitz@google.com> | 2018-05-01 10:22:02 -0400 |
---|---|---|
committer | Dave Borowitz <dborowitz@google.com> | 2018-05-14 14:26:50 -0700 |
commit | e6930d73b01d68f265a78dbbb3ecc449b0b77f55 (patch) | |
tree | 706f671be845e5b6986789f23b37b084fbf2503b /proto | |
parent | e62a11110a87f709db7751173b52e30a06d94a96 (diff) |
Convert OAuthTokenCache serialization to protobuf
The serializer class lives in OAuthTokenCache.java so the extension
framework doesn't acquire a dep on the cache serialization code, which
currently lives in the server package.
Proto3 doesn't have optional fields, so we can't distinguish between
empty and null for the provider_id field (at least without adding a
separate has_provider_id field). Explicitly treat these the same in
OAuthToken itself, and clarify that other fields are not nullable.
Change-Id: I37bd47ac0c8491e5212fcec4885e063ae50d714d
Diffstat (limited to 'proto')
-rw-r--r-- | proto/cache.proto | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/proto/cache.proto b/proto/cache.proto index 8f4298f5ba..cf975c683f 100644 --- a/proto/cache.proto +++ b/proto/cache.proto @@ -35,3 +35,13 @@ message MergeabilityKeyProto { string submit_type = 3; string merge_strategy = 4; } + +// Serialized form of com.google.gerrit.extensions.auth.oauth.OAuthToken. +// Next ID: 6 +message OAuthTokenProto { + string token = 1; + string secret = 2; + string raw = 3; + int64 expires_at = 4; + string providerId = 5; +} |