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/auth
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
..
2fa.go Refactor auth package (#17962) 3 years ago
auth.go Prevent NPE when cache service is disabled (#19703) 3 years ago
linkaccount.go Move almost all functions' parameter db.Engine to context.Context (#19748) 3 years ago
main_test.go Use a struct as test options (#19393) 3 years ago
oauth.go Parse OAuth Authorization header when request omits client secret (#21351) (#21374) 2 years ago
oauth_test.go Use DisplayName() instead of FullName in Oauth provider (#19991) 3 years ago
openid.go Move almost all functions' parameter db.Engine to context.Context (#19748) 3 years ago
password.go Prevent NPE when cache service is disabled (#19703) 3 years ago
webauthn.go WebAuthn CredentialID field needs to be increased in size (#20530) (#20555) 3 years ago