mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(coderd/oauth2provider): support client_secret_basic client auth (#21793)
This commit is contained in:
@@ -329,6 +329,13 @@ func extractOAuth2ProviderAppBase(db database.Store, errWriter errorWriter) func
|
||||
paramAppID = r.Form.Get("client_id")
|
||||
}
|
||||
}
|
||||
if paramAppID == "" {
|
||||
// RFC 6749 §2.3.1: confidential clients may authenticate via
|
||||
// HTTP Basic where the username is the client_id.
|
||||
if user, _, ok := r.BasicAuth(); ok && user != "" {
|
||||
paramAppID = user
|
||||
}
|
||||
}
|
||||
if paramAppID == "" {
|
||||
errWriter.writeMissingClientID(ctx, rw)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user