From f2a180e6173db889a6031f4a49e5447a5c19d563 Mon Sep 17 00:00:00 2001 From: Wenkai Yin Date: Fri, 29 Apr 2016 17:46:00 +0800 Subject: [PATCH] update --- utils/registry/auth/tokenhandler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/registry/auth/tokenhandler.go b/utils/registry/auth/tokenhandler.go index f0ee50b33..c33627491 100644 --- a/utils/registry/auth/tokenhandler.go +++ b/utils/registry/auth/tokenhandler.go @@ -87,10 +87,11 @@ func (t *tokenHandler) AuthorizeRequest(req *http.Request, params map[string]str for _, scope := range scopes { scopeStrs = append(scopeStrs, scope.string()) } - token, expiresIn, issuedAt, err := t.tg(params["realm"], params["service"], scopeStrs) + to, expiresIn, issuedAt, err := t.tg(params["realm"], params["service"], scopeStrs) if err != nil { return err } + token = to if !hasFrom { t.cache = token