Fixed and tested LDAP process

This commit is contained in:
Dan Brown 2016-09-17 18:14:07 +01:00
parent 8b9c38fd3c
commit 74e9bc0676
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
2 changed files with 20 additions and 2 deletions

View File

@ -33,7 +33,6 @@ class LoginController extends Controller
protected $redirectPath = '/';
protected $redirectAfterLogout = '/login';
protected $username = 'email';
protected $socialAuthService;
protected $userRepo;
@ -51,10 +50,14 @@ class LoginController extends Controller
$this->userRepo = $userRepo;
$this->redirectPath = baseUrl('/');
$this->redirectAfterLogout = baseUrl('/login');
$this->username = config('auth.method') === 'standard' ? 'email' : 'username';
parent::__construct();
}
public function username()
{
return config('auth.method') === 'standard' ? 'email' : 'username';
}
/**
* Overrides the action when a user is authenticated.
* If the user authenticated but does not exist in the user table we create them.

View File

@ -0,0 +1,15 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages that we need to display to the user. You are free to modify
| these language lines according to your application's requirements.
|
*/
'failed' => 'These credentials do not match our records.',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
];