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

Unified Diff: impl/prod/info.go

Issue 2220193002: Implement info.ServiceAccount() on devserver via info.AccessToken(...). (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/gae@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « impl/prod/devserver.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/prod/info.go
diff --git a/impl/prod/info.go b/impl/prod/info.go
index a93e413af7fd401b563dc4917963ff942a1303c0..691f08186e6ab75d70a263a03c09c1ea337c4a83 100644
--- a/impl/prod/info.go
+++ b/impl/prod/info.go
@@ -99,6 +99,11 @@ func (g giImpl) ServerSoftware() string {
return appengine.ServerSoftware()
}
func (g giImpl) ServiceAccount() (string, error) {
+ if appengine.IsDevAppServer() {
+ // On devserver ServiceAccount returns empty string, but AccessToken works.
+ // We use it to grab developer's email.
+ return developerAccount(g.aeCtx)
+ }
return appengine.ServiceAccount(g.aeCtx)
}
func (g giImpl) SignBytes(bytes []byte) (keyName string, signature []byte, err error) {
« no previous file with comments | « impl/prod/devserver.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698