mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-24 08:20:31 +08:00
feat: fix LDAP user password checking logic in GetOAuthToken() (#1975)
This commit is contained in:
parent
7058a34f87
commit
cc456f265f
@ -628,7 +628,12 @@ func GetPasswordToken(application *Application, username string, password string
|
|||||||
ErrorDescription: "the user does not exist",
|
ErrorDescription: "the user does not exist",
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
msg := CheckPassword(user, password, "en")
|
var msg string
|
||||||
|
if user.Ldap != "" {
|
||||||
|
msg = checkLdapUserPassword(user, password, "en")
|
||||||
|
} else {
|
||||||
|
msg = CheckPassword(user, password, "en")
|
||||||
|
}
|
||||||
if msg != "" {
|
if msg != "" {
|
||||||
return nil, &TokenError{
|
return nil, &TokenError{
|
||||||
Error: InvalidGrant,
|
Error: InvalidGrant,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user