Skip to content

Commit

Permalink
fix: /api/packages
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfogre committed Jul 6, 2023
1 parent 8f7c1ee commit 9faf9ad
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions routers/api/packages/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ func CommonRoutes() *web.Route {
r.Use(context.PackageContexter())

verifyAuth(r, []auth.Method{
auth.Shortcut{
// auth.OAuth2 and auth.Basic both read "Authorization: Bearer <token>" header,
// so we need have a shortcut for them to avoid the first one returning error to skip the second one.
&auth.OAuth2{},
&conan.Auth{},
},
&auth.OAuth2{},
&auth.Basic{},
&nuget.Auth{},
Expand Down

0 comments on commit 9faf9ad

Please sign in to comment.