{"id":20862384,"url":"https://github.com/ldaptools/ldaptools-bundle","last_synced_at":"2025-04-09T20:09:03.680Z","repository":{"id":3153544,"uuid":"48593277","full_name":"ldaptools/ldaptools-bundle","owner":"ldaptools","description":"Provides easy LDAP integration for Symfony via LdapTools.","archived":false,"fork":false,"pushed_at":"2022-12-21T11:05:26.000Z","size":252,"stargazers_count":49,"open_issues_count":22,"forks_count":29,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T20:08:59.155Z","etag":null,"topics":["ldap","symfony-bundle"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ldaptools.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"Security/Authentication/Provider/LdapAuthenticationProvider.php","support":null}},"created_at":"2015-12-25T22:54:21.000Z","updated_at":"2024-09-01T18:23:15.000Z","dependencies_parsed_at":"2023-01-13T12:19:14.362Z","dependency_job_id":null,"html_url":"https://github.com/ldaptools/ldaptools-bundle","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldaptools%2Fldaptools-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldaptools%2Fldaptools-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldaptools%2Fldaptools-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldaptools%2Fldaptools-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ldaptools","download_url":"https://codeload.github.com/ldaptools/ldaptools-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103872,"owners_count":21048245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ldap","symfony-bundle"],"created_at":"2024-11-18T05:21:17.725Z","updated_at":"2025-04-09T20:09:03.652Z","avatar_url":"https://github.com/ldaptools.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LdapToolsBundle [![Build Status](https://travis-ci.org/ldaptools/ldaptools-bundle.svg)](https://travis-ci.org/ldaptools/ldaptools-bundle) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/ldaptools/ldaptools-bundle?branch=master\u0026svg=true)](https://ci.appveyor.com/project/ChadSikorra/ldaptools-bundle-td18j) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/ldaptools/ldaptools-bundle/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/ldaptools/ldaptools-bundle/?branch=master) [![Latest Stable Version](https://poser.pugx.org/ldaptools/ldaptools-bundle/v/stable.svg)](https://packagist.org/packages/ldaptools/ldaptools-bundle)\n-----------\n\nThe LdapToolsBundle provides easy integration of LDAP for Symfony via [LdapTools](https://github.com/ldaptools/ldaptools).\n\n* An [LDAP authentication provider](/Resources/doc/LDAP-Authentication-Provider.md), including AdvancedUserInterface support.\n* An [LDAP form type](/Resources/doc/LDAP-Object-Form-Type.md) to easily use LDAP objects in forms.\n* An LDAP type for Doctrine to easily store and retrieve LDAP results in a Doctrine entity.\n* Logging capabilities for LDAP operations.\n* Web Debug Toolbar integration for LDAP operations.\n* Integration of [LdapTools events](/Resources/doc/LDAP-Events.md) for LDAP operations (authentication, creation, modification, etc) using service tags.\n\n**Note**: The LdapTools library requires PHP 5.6+.\n\n### Installation\n\nThe recommended way to install the LdapToolsBundle is using [Composer](http://getcomposer.org/download/):\n\n```bash\ncomposer require ldaptools/ldaptools-bundle\n```\n\nThen enable the bundle in the kernel:\n\n```php\n// app/AppKernel.php\nclass AppKernel extends Kernel\n{\n    public function registerBundles()\n    {\n        $bundles = array(\n            // ...\n            new LdapTools\\Bundle\\LdapToolsBundle\\LdapToolsBundle(),\n        );\n\n        // ...\n    }\n}\n```\n\n### Getting Started\n\nAfter installing the bundle you can run the following command to assist in generating/testing your LDAP config:\n\n```php\n# It will prompt for some basic questions (LDAP server, username/password to use, etc)\nphp bin/console ldaptools:generate:config\n```\n\nAdding your domain(s) to the `config.yml` file is as easy as the following example: \n\n```yaml\n# app/config/config.yml\nldap_tools:\n    domains:\n        # The below \"example\" key can be anything you want. It just has to be a unique name for the YML config.\n        example:\n            # The LDAP FQDN is required\n            domain_name: example.local\n            # The username to use for the LDAP connection\n            username: foo\n            # The password to use for the username\n            password: secret\n            # The base DN for LDAP searches (queried from the RootDSE if not provided)\n            base_dn: \"dc=example,dc=local\"\n            # The LDAP servers to use for the connection (Queried from DNS if not provided)\n            servers: [\"dc1\", \"dc2\", \"dc3\"]\n        # Define another domain if you want\n        foo:\n            domain_name: foo.bar\n            username: foo\n            password: bar\n            servers: ['dc1.foo.bar', 'dc2.foo.bar']\n            base_dn: 'dc=foo,dc=bar'\n```\n\nDomain configuration options are also documented in the [LdapTools documentation](https://github.com/ldaptools/ldaptools/blob/master/docs/en/reference/Main-Configuration.md#domain-section).\n\nThen in your controller you can use the `ldap_tools.ldap_manager` service to query/modify/create LDAP objects...\n\n```php\n\nclass DefaultController extends Controller\n{\n    public function indexAction()\n    {\n        $ldap = $this-\u003eget('ldap_tools.ldap_manager');\n        \n        $users = $ldap-\u003ebuildLdapQuery()-\u003efromUsers()-\u003egetLdapQuery()-\u003egetResult();\n        \n        $users-\u003ecount();\n        foreach ($users as $user) {\n            $user-\u003egetFirstName();\n            $user-\u003egetLastName();\n            $user-\u003egetUsername();\n        }\n        \n        # ...\n    }\n}\n```\n\n### Generate/Retrieve Your LDAP SSL Certificate\n\nIf you want a quick way to retrieve your server's LDAP SSL certificate you can run a simple command to output it:\n\n```php\n# Just supply your LDAP server name...\nphp bin/console ldaptools:generate:sslcert --server \"servername\"\n```\n\n### Documentation\n\n* [Configuration Reference](/Resources/doc/Configuration-Reference.md)\n* [LDAP Authentication Provider](/Resources/doc/LDAP-Authentication-Provider.md)\n* [LDAP Authentication with the FOSUserBundle](/Resources/doc/LDAP-Authentication-With-The-FOSUserBundle.md)\n* [Save LDAP Users to the Database After Login](/Resources/doc/Save-LDAP-Users-to-the-Database-After-Login.md)\n* [LDAP Object Form Type](/Resources/doc/LDAP-Object-Form-Type.md)\n* [LdapTools LDAP Events](/Resources/doc/LDAP-Events.md)\n* [Bundle Events Reference](/Resources/doc/Bundle-Event-Reference.md)\n* [LDIF Parser URL Loaders](/Resources/doc/LDIF-Parser-URL-Loaders.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldaptools%2Fldaptools-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fldaptools%2Fldaptools-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldaptools%2Fldaptools-bundle/lists"}