diff --git a/routers/base.go b/routers/base.go index ec84ef1b..4054278d 100644 --- a/routers/base.go +++ b/routers/base.go @@ -49,8 +49,12 @@ func denyRequest(ctx *context.Context) { } func getUsernameByClientIdSecret(ctx *context.Context) string { - clientId := ctx.Input.Query("clientId") - clientSecret := ctx.Input.Query("clientSecret") + clientId, clientSecret, ok := ctx.Request.BasicAuth() + if !ok { + clientId = ctx.Input.Query("clientId") + clientSecret = ctx.Input.Query("clientSecret") + } + if clientId == "" || clientSecret == "" { return "" }