1
0
mirror of https://github.com/docker/docs.git synced 2026-10-31 10:34:26 +03:00

having vet inconsistency between local and circle

This commit is contained in:
David Lawrence
2015-04-24 14:24:20 -07:00
parent 781c8be98f
commit bc5710f0a3

View File

@@ -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
}