{"action":"created","issue":{"url":"https://api.github.com/repos/Adldap2/Adldap2-Laravel/issues/417","repository_url":"https://api.github.com/repos/Adldap2/Adldap2-Laravel","labels_url":"https://api.github.com/repos/Adldap2/Adldap2-Laravel/issues/417/labels{/name}","comments_url":"https://api.github.com/repos/Adldap2/Adldap2-Laravel/issues/417/comments","events_url":"https://api.github.com/repos/Adldap2/Adldap2-Laravel/issues/417/events","html_url":"https://github.com/Adldap2/Adldap2-Laravel/issues/417","id":271188870,"node_id":"MDU6SXNzdWUyNzExODg4NzA=","number":417,"title":"How do i configure my LDAP connection in the config/adldap.php and config/adldap_auth  files.","user":{"login":"scotrolex","id":23723199,"node_id":"MDQ6VXNlcjIzNzIzMTk5","avatar_url":"https://avatars3.githubusercontent.com/u/23723199?v=4","gravatar_id":"","url":"https://api.github.com/users/scotrolex","html_url":"https://github.com/scotrolex","followers_url":"https://api.github.com/users/scotrolex/followers","following_url":"https://api.github.com/users/scotrolex/following{/other_user}","gists_url":"https://api.github.com/users/scotrolex/gists{/gist_id}","starred_url":"https://api.github.com/users/scotrolex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scotrolex/subscriptions","organizations_url":"https://api.github.com/users/scotrolex/orgs","repos_url":"https://api.github.com/users/scotrolex/repos","events_url":"https://api.github.com/users/scotrolex/events{/privacy}","received_events_url":"https://api.github.com/users/scotrolex/received_events","type":"User","site_admin":false},"labels":[{"id":239217728,"node_id":"MDU6TGFiZWwyMzkyMTc3Mjg=","url":"https://api.github.com/repos/Adldap2/Adldap2-Laravel/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2017-11-04T12:34:03Z","updated_at":"2018-11-16T16:44:15Z","closed_at":"2018-11-15T22:44:21Z","author_association":"NONE","body":"- Laravel Version: 5.4\r\n- Adldap2-Laravel Version: 3.0\r\n- PHP Version: 7.0\r\n\r\n### Description:\r\nI'm a new user of laravel. I use laravel 5.4. am trying to use ldap authentication in my project .\r\nI followed the tutorial from https://github.com/Adldap2/Adldap2-Laravel.\r\n\r\nI stopped at this step because I did not know how to use this code and Don't know how to configure my LDAP connection in the config/adldap.php file but i have a openldap server install on my system.\r\n\r\nThanks in advance\r\n\r\nFirst, configure your LDAP connection in the config/adldap.php file.\r\n\r\nThen, you can perform all methods on your Adldap connection through its facade like so:\r\n\r\nuse Adldap\\Laravel\\Facades\\Adldap;\r\n\r\n// Finding a user.\r\n$user = Adldap::search()->users()->find('john doe');\r\n\r\n// Searching for a user.\r\n$search = Adldap::search()->where('cn', '=', 'John Doe')->get();\r\n\r\n// Authenticating against your LDAP server.\r\nif (Adldap::auth()->attempt($username, $password)) {\r\n// Passed!\r\n}\r\n\r\n// Running an operation under a different connection:\r\n$users = Adldap::getProvider('other-connection')->search()->users()->get();\r\n\r\n// Creating a user.\r\n$user = Adldap::make()->user([\r\n'cn' => 'John Doe',\r\n]);\r\n\r\n$user->save();\r\nOr you can inject the Adldap interface into your controllers:\r\n\r\nuse Adldap\\AdldapInterface;\r\n\r\nclass UserController extends Controller\r\n{\r\n/**\r\n * @var Adldap\r\n */\r\nprotected $adldap;\r\n\r\n/**\r\n * Constructor.\r\n *\r\n * @param AdldapInterface $adldap\r\n */\r\npublic function __construct(AdldapInterface $adldap)\r\n{\r\n    $this->adldap = $adldap;\r\n}\r\n\r\n/**\r\n * Displays the all LDAP users.\r\n *\r\n * @return \\Illuminate\\View\\View\r\n */\r\npublic function index()\r\n{\r\n    $users = $this->adldap->search()->users()->get();\r\n\r\n    return view('users.index', compact('users'));\r\n}\r\n}\r\n\r\nI will be grateful if you help me  @stevebauman \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Adldap2/Adldap2-Laravel/issues/comments/439453297","html_url":"https://github.com/Adldap2/Adldap2-Laravel/issues/417#issuecomment-439453297","issue_url":"https://api.github.com/repos/Adldap2/Adldap2-Laravel/issues/417","id":439453297,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTQ1MzI5Nw==","user":{"login":"scotrolex","id":23723199,"node_id":"MDQ6VXNlcjIzNzIzMTk5","avatar_url":"https://avatars3.githubusercontent.com/u/23723199?v=4","gravatar_id":"","url":"https://api.github.com/users/scotrolex","html_url":"https://github.com/scotrolex","followers_url":"https://api.github.com/users/scotrolex/followers","following_url":"https://api.github.com/users/scotrolex/following{/other_user}","gists_url":"https://api.github.com/users/scotrolex/gists{/gist_id}","starred_url":"https://api.github.com/users/scotrolex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scotrolex/subscriptions","organizations_url":"https://api.github.com/users/scotrolex/orgs","repos_url":"https://api.github.com/users/scotrolex/repos","events_url":"https://api.github.com/users/scotrolex/events{/privacy}","received_events_url":"https://api.github.com/users/scotrolex/received_events","type":"User","site_admin":false},"created_at":"2018-11-16T16:44:15Z","updated_at":"2018-11-16T16:44:15Z","author_association":"NONE","body":"thanks\n\n\nOn Thu, Nov 15, 2018 at 11:44 PM Steve Bauman <notifications@github.com>\nwrote:\n\n> Closed #417 <https://github.com/Adldap2/Adldap2-Laravel/issues/417>.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/Adldap2/Adldap2-Laravel/issues/417#event-1969951500>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AWn8v6hAjQWTbKf_q9RXydAcWiwNKDPWks5uve5HgaJpZM4QR_gY>\n> .\n>\n"}}
{"actor":{"display_login":"scotrolex"}}