Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit 819ca81

Browse files
committed
Merge pull request #10 from strebl/config-fix
Adjust configuration to text
2 parents 2c219a8 + e9add34 commit 819ca81

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Config/auth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
|
2020
*/
2121

22-
'username_attribute' => ['email' => 'mail'],
22+
'username_attribute' => ['username' => 'samaccountname'],
2323

2424
/*
2525
|--------------------------------------------------------------------------

tests/AdldapTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function testAuthPasses()
5959
Adldap::shouldReceive('users')->once()->andReturn($mockedUsers);
6060
Adldap::shouldReceive('authenticate')->once()->andReturn(true);
6161

62-
$this->assertTrue(Auth::attempt(['email' => 'jdoe@email.com', 'password' => '12345']));
62+
$this->assertTrue(Auth::attempt(['username' => 'jdoe', 'password' => '12345']));
6363

6464
$user = Auth::user();
6565

@@ -100,7 +100,7 @@ public function testAuthFails()
100100

101101
Adldap::shouldReceive('users')->once()->andReturn($mockedUsers);
102102

103-
$this->assertFalse(Auth::attempt(['email' => 'jdoe@email.com', 'password' => '12345']));
103+
$this->assertFalse(Auth::attempt(['username' => 'jdoe', 'password' => '12345']));
104104
}
105105

106106
public function testAuthFailsWhenUserFound()
@@ -127,7 +127,7 @@ public function testAuthFailsWhenUserFound()
127127
Adldap::shouldReceive('users')->once()->andReturn($mockedUsers);
128128
Adldap::shouldReceive('authenticate')->once()->andReturn(false);
129129

130-
$this->assertFalse(Auth::attempt(['email' => 'jdoe@email.com', 'password' => '12345']));
130+
$this->assertFalse(Auth::attempt(['username' => 'jdoe', 'password' => '12345']));
131131
}
132132

133133
public function testCredentialsKeyDoesNotExist()

0 commit comments

Comments
 (0)