You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/routers/web
M Hickford 14bc4d79c1
Parse OAuth Authorization header when request omits client secret (#21351) (#21374)
Backport #21351

This fixes error "unauthorized_client: invalid client secret" when
client includes secret in Authorization header rather than request body.
OAuth spec permits both:
https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1

Clients in possession of a client password MAY use the HTTP Basic
authentication scheme ... Alternatively, the authorization server MAY
support including the client credentials in the request-body

Sanity validation that client id and client secret in request are
consistent with Authorization header.

Improve error descriptions. Error codes remain the same.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
2 years ago
..
admin Redirect if user does not exist on admin pages (#20981) (#21059) 3 years ago
auth Parse OAuth Authorization header when request omits client secret (#21351) (#21374) 2 years ago
dev Move user related model into models/user (#17781) 3 years ago
events Improve Stopwatch behavior (#18930) 3 years ago
explore In code search, get code unit accessible repos in one (main) query (#19764) 3 years ago
feed Use absolute links in feeds (#21229) (#21265) 2 years ago
healthcheck Update go-chi/cache to utilize Ping() (#19719) 3 years ago
misc Fix panic in team repos API (#19431) 3 years ago
org Fix SQL Query for `SearchTeam` (#20844) (#20872) 3 years ago
repo Tag list should include draft releases with existing tags (#21263) (#21365) 2 years ago
user Remove calls to load Mirrors in user.Dashboard (#20855) (#20897) 3 years ago
auth.go Remove legacy `+build:` constraint (#19582) 3 years ago
auth_windows.go Let web and API routes have different auth methods group (#19168) 3 years ago
base.go Add Cache-Control header to html and api responses, add no-transform (#20432) (#20459) 3 years ago
goget.go Refactor legacy `unknwon/com` package, improve golangci lint (#19284) 3 years ago
home.go Renamed ctx.User to ctx.Doer. (#19161) 3 years ago
metrics.go Update HTTP status codes to modern codes (#18063) 3 years ago
nodeinfo.go Add nodeinfo endpoint for federation purposes (#16953) 3 years ago
swagger_json.go Refactor routers directory (#15800) 4 years ago
web.go Add disable download source configuration (#20548) (#20579) 3 years ago
webfinger.go Move almost all functions' parameter db.Engine to context.Context (#19748) 3 years ago