{"action":"opened","issue":{"url":"https://api.github.com/repos/Adldap2/Adldap2-Laravel/issues/213","repository_url":"https://api.github.com/repos/Adldap2/Adldap2-Laravel","labels_url":"https://api.github.com/repos/Adldap2/Adldap2-Laravel/issues/213/labels{/name}","comments_url":"https://api.github.com/repos/Adldap2/Adldap2-Laravel/issues/213/comments","events_url":"https://api.github.com/repos/Adldap2/Adldap2-Laravel/issues/213/events","html_url":"https://github.com/Adldap2/Adldap2-Laravel/issues/213","id":190381150,"number":213,"title":"How can I debug failed logins?","user":{"login":"DelightedD0D","id":8271955,"avatar_url":"https://avatars.githubusercontent.com/u/8271955?v=3","gravatar_id":"","url":"https://api.github.com/users/DelightedD0D","html_url":"https://github.com/DelightedD0D","followers_url":"https://api.github.com/users/DelightedD0D/followers","following_url":"https://api.github.com/users/DelightedD0D/following{/other_user}","gists_url":"https://api.github.com/users/DelightedD0D/gists{/gist_id}","starred_url":"https://api.github.com/users/DelightedD0D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DelightedD0D/subscriptions","organizations_url":"https://api.github.com/users/DelightedD0D/orgs","repos_url":"https://api.github.com/users/DelightedD0D/repos","events_url":"https://api.github.com/users/DelightedD0D/events{/privacy}","received_events_url":"https://api.github.com/users/DelightedD0D/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-18T17:50:28Z","updated_at":"2016-11-18T17:50:28Z","closed_at":null,"body":"I'm new to Laravel and Adldap2. Im using Laravel 5.3. When I go to `homestead.local/login` and try to login, the page simply refreshes. Obviously, the login is failing, but there is no error to indicate what might be wrong. \r\n\r\n**How can I get more information on what is not working?**\r\n\r\n\r\nIf I run `php artisan adldap:import`, it seems to find the users, but does not import them:\r\n\r\n```\r\nvagrant@homestead:~/laravel/hdapps$ php artisan adldap:import\r\nFound 2530 user(s). Importing...\r\n 2467/2467 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%\r\nSuccessfully imported / synchronized 0 user(s).\r\n```\r\n\r\n\r\nHere are the settings that seem relevant:\r\n\r\n\r\n**adldap_auth.php**\r\n\r\n```\r\n<?php\r\nreturn [\r\n    'connection' => env('ADLDAP_CONNECTION', 'default'),\r\n    'username_attribute' => ['username' => 'samaccountname'],\r\n    'limitation_filter' => env('ADLDAP_LIMITATION_FILTER', ''),\r\n    'login_fallback' => env('ADLDAP_LOGIN_FALLBACK', false),\r\n    'password_key' => env('ADLDAP_PASSWORD_KEY', 'password'),\r\n    'password_sync' => env('ADLDAP_PASSWORD_SYNC', false),  \r\n    'login_attribute' => env('ADLDAP_LOGIN_ATTRIBUTE', 'samaccountname'),\r\n    'windows_auth_attribute' => ['samaccountname' => 'AUTH_USER'],\r\n    'bind_user_to_model' => env('ADLDAP_BIND_USER_TO_MODEL', true),\r\n    'sync_attributes' => [\r\n        'name' => 'cn',\r\n    ],\r\n    'select_attributes' => [],\r\n];\r\n\r\n```\r\n\r\n\r\n\r\n**adldap.php**\r\n\r\n```\r\n<?php\r\nreturn [\r\n    'connections' => [\r\n        'default' => [\r\n            'auto_connect' => true,\r\n            'connection' => Adldap\\Connections\\Ldap::class,\r\n            'schema' => Adldap\\Schemas\\ActiveDirectory::class,\r\n            'connection_settings' => [\r\n                'account_prefix' => 'MYCOMPANY, // correct in actual file\r\n                'account_suffix' => '@mycompany.local',  // correct in actual file\r\n                'domain_controllers' => ['xxx.xx.x.xx'], // correct in actual file\r\n                'port' => 389,\r\n                'timeout' => 5,\r\n                'base_dn' => 'dc=mycompany,dc=local',\r\n                'admin_account_suffix' => '',\r\n                'admin_username' => env('ADLDAP_ADMIN_USERNAME', 'username'), // correct in actual file\r\n                'admin_password' => env('ADLDAP_ADMIN_PASSWORD', 'password'), // correct in actual file\r\n                'follow_referrals' => false,\r\n                'use_ssl' => false,\r\n                'use_tls' => false,\r\n            ],\r\n        ],\r\n    ],\r\n];\r\n```\r\n\r\n\r\n**app.php**\r\n\r\n```\r\n<?php\r\n\r\nreturn [\r\n    'name' => 'Laravel',\r\n    'env' => env('APP_ENV', 'production'),\r\n    'debug' => env('APP_DEBUG', true),\r\n    'url' => env('APP_URL', 'http://localhost'),\r\n    'timezone' => 'UTC',\r\n    'locale' => 'en',\r\n    'fallback_locale' => 'en',\r\n    'key' => env('APP_KEY'),\r\n    'cipher' => 'AES-256-CBC',\r\n    'log' => env('APP_LOG', 'single'),\r\n    'log_level' => env('APP_LOG_LEVEL', 'debug'),\r\n    'providers' => [\r\n        /*\r\n         * Laravel Framework Service Providers...\r\n         */\r\n        Illuminate\\Auth\\AuthServiceProvider::class,\r\n        Illuminate\\Broadcasting\\BroadcastServiceProvider::class,\r\n        Illuminate\\Bus\\BusServiceProvider::class,\r\n        Illuminate\\Cache\\CacheServiceProvider::class,\r\n        Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider::class,\r\n        Illuminate\\Cookie\\CookieServiceProvider::class,\r\n        Illuminate\\Database\\DatabaseServiceProvider::class,\r\n        Illuminate\\Encryption\\EncryptionServiceProvider::class,\r\n        Illuminate\\Filesystem\\FilesystemServiceProvider::class,\r\n        Illuminate\\Foundation\\Providers\\FoundationServiceProvider::class,\r\n        Illuminate\\Hashing\\HashServiceProvider::class,\r\n        Illuminate\\Mail\\MailServiceProvider::class,\r\n        Illuminate\\Notifications\\NotificationServiceProvider::class,\r\n        Illuminate\\Pagination\\PaginationServiceProvider::class,\r\n        Illuminate\\Pipeline\\PipelineServiceProvider::class,\r\n        Illuminate\\Queue\\QueueServiceProvider::class,\r\n        Illuminate\\Redis\\RedisServiceProvider::class,\r\n        Illuminate\\Auth\\Passwords\\PasswordResetServiceProvider::class,\r\n        Illuminate\\Session\\SessionServiceProvider::class,\r\n        Illuminate\\Translation\\TranslationServiceProvider::class,\r\n        Illuminate\\Validation\\ValidationServiceProvider::class,\r\n        Illuminate\\View\\ViewServiceProvider::class,\r\n        /*\r\n         * Package Service Providers...\r\n         */\r\n        /*\r\n         * Application Service Providers...\r\n         */\r\n        App\\Providers\\AppServiceProvider::class,\r\n        App\\Providers\\AuthServiceProvider::class,\r\n        // App\\Providers\\BroadcastServiceProvider::class,\r\n        App\\Providers\\EventServiceProvider::class,\r\n        App\\Providers\\RouteServiceProvider::class,\r\n        Chrisbjr\\ApiGuard\\Providers\\ApiGuardServiceProvider::class,\r\n        Adldap\\Laravel\\AdldapServiceProvider::class,\r\n        Adldap\\Laravel\\AdldapAuthServiceProvider::class\r\n\r\n    ],\r\n    'aliases' => [\r\n\r\n        'App' => Illuminate\\Support\\Facades\\App::class,\r\n        'Artisan' => Illuminate\\Support\\Facades\\Artisan::class,\r\n        'Auth' => Illuminate\\Support\\Facades\\Auth::class,\r\n        'Blade' => Illuminate\\Support\\Facades\\Blade::class,\r\n        'Bus' => Illuminate\\Support\\Facades\\Bus::class,\r\n        'Cache' => Illuminate\\Support\\Facades\\Cache::class,\r\n        'Config' => Illuminate\\Support\\Facades\\Config::class,\r\n        'Cookie' => Illuminate\\Support\\Facades\\Cookie::class,\r\n        'Crypt' => Illuminate\\Support\\Facades\\Crypt::class,\r\n        'DB' => Illuminate\\Support\\Facades\\DB::class,\r\n        'Eloquent' => Illuminate\\Database\\Eloquent\\Model::class,\r\n        'Event' => Illuminate\\Support\\Facades\\Event::class,\r\n        'File' => Illuminate\\Support\\Facades\\File::class,\r\n        'Gate' => Illuminate\\Support\\Facades\\Gate::class,\r\n        'Hash' => Illuminate\\Support\\Facades\\Hash::class,\r\n        'Lang' => Illuminate\\Support\\Facades\\Lang::class,\r\n        'Log' => Illuminate\\Support\\Facades\\Log::class,\r\n        'Mail' => Illuminate\\Support\\Facades\\Mail::class,\r\n        'Notification' => Illuminate\\Support\\Facades\\Notification::class,\r\n        'Password' => Illuminate\\Support\\Facades\\Password::class,\r\n        'Queue' => Illuminate\\Support\\Facades\\Queue::class,\r\n        'Redirect' => Illuminate\\Support\\Facades\\Redirect::class,\r\n        'Redis' => Illuminate\\Support\\Facades\\Redis::class,\r\n        'Request' => Illuminate\\Support\\Facades\\Request::class,\r\n        'Response' => Illuminate\\Support\\Facades\\Response::class,\r\n        'Route' => Illuminate\\Support\\Facades\\Route::class,\r\n        'Schema' => Illuminate\\Support\\Facades\\Schema::class,\r\n        'Session' => Illuminate\\Support\\Facades\\Session::class,\r\n        'Storage' => Illuminate\\Support\\Facades\\Storage::class,\r\n        'URL' => Illuminate\\Support\\Facades\\URL::class,\r\n        'Validator' => Illuminate\\Support\\Facades\\Validator::class,\r\n        'View' => Illuminate\\Support\\Facades\\View::class,\r\n        'ApiGuardAuth' => \\Chrisbjr\\ApiGuard\\Facades\\ApiGuardAuth::class,\r\n        'Adldap' => Adldap\\Laravel\\Facades\\Adldap::class\r\n\r\n    ],\r\n];\r\n```\r\n\r\n\r\n\r\n**auth.php**\r\n```\r\n\r\n<?php\r\nreturn [ \r\n    'defaults' => [\r\n        'guard' => 'web',\r\n        'passwords' => 'users',\r\n    ], \r\n    'guards' => [\r\n        'web' => [\r\n            'driver' => 'session',\r\n            'provider' => 'users',\r\n        ],\r\n        'api' => [\r\n            'driver' => 'token',\r\n            'provider' => 'users',\r\n        ],\r\n    ], \r\n    'providers' => [\r\n        'users' => [\r\n            'driver' => 'adldap', // Changed from 'eloquent'\r\n            'model' => App\\User::class,\r\n        ], \r\n    ],\r\n    'passwords' => [\r\n        'users' => [\r\n            'provider' => 'users',\r\n            'table' => 'password_resets',\r\n            'expire' => 60,\r\n        ],\r\n    ],\r\n];\r\n\r\n```\r\n\r\n**login.blade.php**\r\n\r\n```\r\n@extends('layouts.app')\r\n@section('content')\r\n<div class=\"container\">\r\n    <div class=\"row\">\r\n        <div class=\"col-md-8 col-md-offset-2\">\r\n            <div class=\"panel panel-default\">\r\n                <div class=\"panel-heading\">Login</div>\r\n                <div class=\"panel-body\">\r\n                    <form class=\"form-horizontal\" role=\"form\" method=\"POST\" action=\"{{ url('/login') }}\">\r\n                        {{ csrf_field() }}\r\n                        <div class=\"form-group{{ $errors->has('username') ? ' has-error' : '' }}\">\r\n                            <label for=\"username\" class=\"col-md-4 control-label\">Username</label>\r\n                            <div class=\"col-md-6\">\r\n                                <input id=\"username\" type=\"text\" class=\"form-control\" name=\"username\" value=\"{{ old('username') }}\" required autofocus>\r\n                                @if ($errors->has('username'))\r\n                                    <span class=\"help-block\">\r\n                                        <strong>{{ $errors->first('username') }}</strong>\r\n                                    </span>\r\n                                @endif\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"form-group{{ $errors->has('password') ? ' has-error' : '' }}\">\r\n                            <label for=\"password\" class=\"col-md-4 control-label\">Password</label>\r\n                            <div class=\"col-md-6\">\r\n                                <input id=\"password\" type=\"password\" class=\"form-control\" name=\"password\" required>\r\n                                @if ($errors->has('password'))\r\n                                    <span class=\"help-block\">\r\n                                        <strong>{{ $errors->first('password') }}</strong>\r\n                                    </span>\r\n                                @endif\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"form-group\">\r\n                            <div class=\"col-md-6 col-md-offset-4\">\r\n                                <div class=\"checkbox\">\r\n                                    <label>\r\n                                        <input type=\"checkbox\" name=\"remember\"> Remember Me\r\n                                    </label>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                        <div class=\"form-group\">\r\n                            <div class=\"col-md-8 col-md-offset-4\">\r\n                                <button type=\"submit\" class=\"btn btn-primary\">\r\n                                    Login\r\n                                </button>\r\n\r\n                            </div>\r\n                        </div>\r\n                    </form>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>\r\n@endsection\r\n```\r\n"}}
{"actor":{"display_login":"DelightedD0D"}}