mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 20:50:19 +08:00
Support silent login from HTTP basic authentication.
This commit is contained in:
@ -49,8 +49,12 @@ func denyRequest(ctx *context.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getUsernameByClientIdSecret(ctx *context.Context) string {
|
func getUsernameByClientIdSecret(ctx *context.Context) string {
|
||||||
clientId := ctx.Input.Query("clientId")
|
clientId, clientSecret, ok := ctx.Request.BasicAuth()
|
||||||
clientSecret := ctx.Input.Query("clientSecret")
|
if !ok {
|
||||||
|
clientId = ctx.Input.Query("clientId")
|
||||||
|
clientSecret = ctx.Input.Query("clientSecret")
|
||||||
|
}
|
||||||
|
|
||||||
if clientId == "" || clientSecret == "" {
|
if clientId == "" || clientSecret == "" {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user