forked from mystiq/dex
Merge pull request #315 from fnordahl/issue/314-entryDN-does-not-exist
Get DN from entry, not entryDN attribute
This commit is contained in:
commit
dc9e596542
1 changed files with 1 additions and 2 deletions
|
@ -288,7 +288,6 @@ func (m *LDAPIdentityProvider) Identity(username, password string) (*oidc.Identi
|
||||||
filter := m.ParseString(m.searchFilter, username)
|
filter := m.ParseString(m.searchFilter, username)
|
||||||
|
|
||||||
attributes := []string{
|
attributes := []string{
|
||||||
"entryDN",
|
|
||||||
m.nameAttribute,
|
m.nameAttribute,
|
||||||
m.emailAttribute,
|
m.emailAttribute,
|
||||||
}
|
}
|
||||||
|
@ -304,7 +303,7 @@ func (m *LDAPIdentityProvider) Identity(username, password string) (*oidc.Identi
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
bindDN = sr.Entries[0].GetAttributeValue("entryDN")
|
bindDN = sr.Entries[0].DN
|
||||||
ldapName = sr.Entries[0].GetAttributeValue(m.nameAttribute)
|
ldapName = sr.Entries[0].GetAttributeValue(m.nameAttribute)
|
||||||
ldapEmail = sr.Entries[0].GetAttributeValue(m.emailAttribute)
|
ldapEmail = sr.Entries[0].GetAttributeValue(m.emailAttribute)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue