From c668d6f957a724b4a3a79a84dd9d6600a2a911c7 Mon Sep 17 00:00:00 2001 From: Greg Steuck Date: Mon, 12 Jul 2021 20:49:17 -0700 Subject: dashboard/app: control time externally from api.go This way the tested code is independent of the time passage and the tests are reliable. --- dashboard/app/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dashboard/app/api.go') diff --git a/dashboard/app/api.go b/dashboard/app/api.go index 8ce6658cf..dad31c3df 100644 --- a/dashboard/app/api.go +++ b/dashboard/app/api.go @@ -105,7 +105,7 @@ func handleAPI(c context.Context, r *http.Request) (reply interface{}, err error method := r.PostFormValue("method") log.Infof(c, "api %q from %q", method, client) auth := makeAuthEndpoint(googleTokenInfoEndpoint) - subj, err := auth.determineAuthSubj(r.Header["Authorization"]) + subj, err := auth.determineAuthSubj(timeNow(c), r.Header["Authorization"]) if err != nil { return nil, err } -- cgit mrf-deployment