mirror of
https://github.com/bluenviron/mediamtx.git
synced 2026-01-24 12:29:50 -08:00
rtsp: rewrite authentication around ServerConn.VerifyCredentials (#4267)
Some checks failed
code_lint / golangci_lint (push) Has been cancelled
code_lint / mod_tidy (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_highlevel (push) Has been cancelled
Some checks failed
code_lint / golangci_lint (push) Has been cancelled
code_lint / mod_tidy (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_highlevel (push) Has been cancelled
This commit is contained in:
parent
7ade2896e5
commit
386be42784
21 changed files with 165 additions and 218 deletions
|
|
@ -294,7 +294,7 @@ func (a *API) middlewareAuth(ctx *gin.Context) {
|
|||
|
||||
err := a.AuthManager.Authenticate(req)
|
||||
if err != nil {
|
||||
if err.(*auth.Error).AskCredentials { //nolint:errorlint
|
||||
if err.(auth.Error).AskCredentials { //nolint:errorlint
|
||||
ctx.Header("WWW-Authenticate", `Basic realm="mediamtx"`)
|
||||
ctx.AbortWithStatus(http.StatusUnauthorized)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue