From bc5710f0a37cd890ac2c358ca3df026765eee126 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Fri, 24 Apr 2015 14:24:20 -0700 Subject: [PATCH] having vet inconsistency between local and circle --- auth/token/authorizer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auth/token/authorizer.go b/auth/token/authorizer.go index cc5d9d7aa5..52c3a5e646 100644 --- a/auth/token/authorizer.go +++ b/auth/token/authorizer.go @@ -163,7 +163,7 @@ func (ac *tokenAuthorizer) Authorize(r *http.Request, scopes ...auth.Scope) (*au return nil, challenge } - resource := auth.Resource{"repo", utils.ResourceName(r)} + resource := auth.Resource{Type: "repo", Name: utils.ResourceName(r)} return ac.authorize(token, resource, scopes...) } @@ -204,7 +204,7 @@ func (ac *tokenAuthorizer) authorize(token *Token, resource auth.Resource, scope } } - return &auth.User{token.Claims.Subject}, nil + return &auth.User{Name: token.Claims.Subject}, nil }