LdapBundle | This bundle is autonomous ; He does n't require apache | Authentication library
kandi X-RAY | LdapBundle Summary
kandi X-RAY | LdapBundle Summary
LdapBundle provides LDAP authentication without using Apache's mod_ldap. The bundle instead relies on PHP's LDAP extension along with a form to authenticate users. LdapBundle can also be used for authorization by retrieving the user's roles defined in LDAP.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Add LDAP roles to LDAP .
- Perform LDAP search
- Authenticates LDAP user .
- Attempt to authenticate the request .
- Search for an anonymous user
- Add client configuration .
- Create auth provider .
- Returns true if this user is equal to another .
- Handles the configuration injection .
- Login action
LdapBundle Key Features
LdapBundle Examples and Code Snippets
Community Discussions
Trending Discussions on LdapBundle
QUESTION
(updated at the end)
I am having trouble registering any user from a specific LDAP as even after finding the user from LDAP, when it tries to register, the username is null, so it triggers a violation constraint and rollsback. Am using Sonata User Bundle, FR3D LDAP Bundle and FOS User Bundle.
dev.log
...ANSWER
Answered 2018-Feb-08 at 11:02My problem was I was only getting like email, sn, cn information after binding with MS Active Directory, not even samaccountname was stored in my User object.
The solution is to use the bundle's custom hydrator:
https://github.com/Maks3w/FR3DLdapBundle/blob/master/Resources/doc/cookbook/custom_hydrator.md. Through this you will be able to get access to every attributes in the LDAP record you searched for. If you follow the documentation it is all you need to fix the said issue.
However, in my version I import existing users via a CSV importer that includes their Usernames from LDAP but I cannot generate their DN string automatically, thus cannot login with only their Usernames, as their DN string contains specific "OU" information.
I solved this issue by loading the user from LDAP on every login to get up-to-date information like DN string and others that change frequently. I then either update an existing user or create a new one depending on repository search result, which also allows imported users to login and no duplicate entries of users. Thanks to ejkun for the elegant solution: https://github.com/Maks3w/FR3DLdapBundle/issues/53#issuecomment-330905167. There's also a bonus on how to detect disabled accounts in AD.
Here is my version of UserHydrator:
QUESTION
I'm using FR3DLdapBundle with FOSUserBundle.
Symfony Version 3.2.6 FR3DLdapBundle Version 3
config.yml
...ANSWER
Answered 2017-May-02 at 14:51you just need to change your baseDn like so:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install LdapBundle
Enable the Bundle
Configure LdapBundle in security.yml
Import LdapBundle routing
Implement Logout
Use chain provider
Subscribe to PRE_BIND event
Subscribe to POST_BIND event
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page