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

Unified Diff: server/auth/internal/fetch.go

Issue 2386643003: auth: Make luci-go services trust signatures produced by the token server. (Closed)
Patch Set: add tests Created 4 years, 2 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 | « server/auth/delegation/minter_test.go ('k') | server/auth/internal/testing.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: server/auth/internal/fetch.go
diff --git a/server/auth/internal/fetch.go b/server/auth/internal/fetch.go
index 672e4ff8eac16be10213e4d2915f9afd9c5ccca0..cb3512c9effbde805d735e779680b7666c9c2866 100644
--- a/server/auth/internal/fetch.go
+++ b/server/auth/internal/fetch.go
@@ -71,6 +71,9 @@ func (r *Request) Do(c context.Context) error {
}
} else {
client = http.DefaultClient
+ if testTransport := c.Value(&testTransportKey); testTransport != nil {
+ client = &http.Client{Transport: testTransport.(http.RoundTripper)}
+ }
}
// Prepare a blob with the request body. Marshal it once, to avoid
« no previous file with comments | « server/auth/delegation/minter_test.go ('k') | server/auth/internal/testing.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698