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

Unified Diff: server/auth/delegation.go

Issue 2785973002: token-server: Add protos for new API for generating service account tokens. (Closed)
Patch Set: more nits Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | server/auth/delegation_test.go » ('j') | tokenserver/api/minter/v1/token_minter.proto » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: server/auth/delegation.go
diff --git a/server/auth/delegation.go b/server/auth/delegation.go
index 867a4185d3e403e3fcd759e5f4e57ccf9ab4e410..18b1a108d4a19efd78ce607ffbdccd96f03d2e92 100644
--- a/server/auth/delegation.go
+++ b/server/auth/delegation.go
@@ -20,6 +20,8 @@ import (
"strings"
"time"
+ "google.golang.org/grpc"
+
"golang.org/x/net/context"
"github.com/luci/luci-go/common/clock"
@@ -105,7 +107,12 @@ type DelegationTokenParams struct {
// rpcClient is token server RPC client to use.
//
// Mocked in tests.
- rpcClient minter.TokenMinterClient
+ rpcClient tokenMinterClient
+}
+
+// tokenMinterClient is subset of minter.TokenMinterClient we use.
+type tokenMinterClient interface {
+ MintDelegationToken(context.Context, *minter.MintDelegationTokenRequest, ...grpc.CallOption) (*minter.MintDelegationTokenResponse, error)
}
// delegationTokenCache is used to store delegation tokens in the cache.
« no previous file with comments | « no previous file | server/auth/delegation_test.go » ('j') | tokenserver/api/minter/v1/token_minter.proto » ('J')

Powered by Google App Engine
This is Rietveld 408576698