Skip to content

Commit

Permalink
fix(ldap): remove whoami check
Browse files Browse the repository at this point in the history
  • Loading branch information
fiftin committed Feb 10, 2024
1 parent a1a47c9 commit dd38199
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions api/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,6 @@ func tryFindLDAPUser(username, password string) (*db.User, error) {
return nil, err
}

// Ensure authentication and verify itself with whoami operation
var res *ldap.WhoAmIResult
if res, err = l.WhoAmI(nil); err != nil {
return nil, err
}
if len(res.AuthzID) <= 0 {
return nil, fmt.Errorf("error while doing whoami operation")
}

// Second time bind as read only user
if err = l.Bind(util.Config.LdapBindDN, util.Config.LdapBindPassword); err != nil {
return nil, err
Expand Down

0 comments on commit dd38199

Please sign in to comment.