Chromium Code Reviews| Index: appengine/gaeauth/server/default.go |
| diff --git a/appengine/gaeauth/server/default.go b/appengine/gaeauth/server/default.go |
| index 8942e0e17db1d0fba121675f320434b714ba7b9a..72a6d30969c47916147375bcc3d0b9706ea15205 100644 |
| --- a/appengine/gaeauth/server/default.go |
| +++ b/appengine/gaeauth/server/default.go |
| @@ -5,12 +5,15 @@ |
| package server |
| import ( |
| + "strings" |
| + |
| "github.com/julienschmidt/httprouter" |
| "golang.org/x/net/context" |
| "google.golang.org/appengine" |
| "github.com/luci/luci-go/server/auth" |
| "github.com/luci/luci-go/server/auth/admin" |
| + "github.com/luci/luci-go/server/auth/info" |
| "github.com/luci/luci-go/server/auth/openid" |
| "github.com/luci/luci-go/server/auth/signing" |
| "github.com/luci/luci-go/server/middleware" |
| @@ -37,6 +40,7 @@ func InstallHandlers(r *httprouter.Router, base middleware.Base) { |
| admin.InstallHandlers(r, base, &UsersAPIAuthMethod{}, adminPagesConfig{}) |
| auth.InstallHandlers(r, base) |
| authdb.InstallHandlers(r, base) |
| + info.InstallHandlers(r, base, getServiceInfo) |
| signing.InstallHandlers(r, base) |
| } |
| @@ -49,6 +53,19 @@ func Warmup(c context.Context) error { |
| return nil |
| } |
| +func getServiceInfo(c context.Context) (info.ServiceInfo, error) { |
| + account, err := appengine.ServiceAccount(c) |
| + if err != nil { |
| + return info.ServiceInfo{}, err |
| + } |
| + return info.ServiceInfo{ |
| + AppID: appengine.AppID(c), |
| + AppRuntime: "go", |
|
M-A Ruel
2015/11/24 13:47:59
Do you think it's useful to have runtime version?
Vadim Sh.
2015/11/24 19:27:29
Done.
|
| + AppVersion: strings.Split(appengine.VersionID(c), ".")[0], |
| + ServiceAccountName: account, |
| + }, nil |
| +} |
| + |
| /// |
| // adminPagesConfig is used by server/auth/admin to display admin UI |