-
Notifications
You must be signed in to change notification settings - Fork 43
/
CustomUserProvider.php
36 lines (28 loc) · 861 Bytes
/
CustomUserProvider.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
namespace MagicLink\Test\TestSupport;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Contracts\Auth\UserProvider;
class CustomUserProvider implements UserProvider
{
public function retrieveById($identifier)
{
return new CustomAutenticable($identifier);
}
public function retrieveByToken($identifier, $token)
{
print_r([__LINE__ => $identifier]);
}
public function updateRememberToken(Authenticatable $user, $token)
{
print_r([__LINE__ => $user]);
}
public function retrieveByCredentials(array $credentials)
{
print_r([__LINE__ => $credentials]);
//return User::where('username', $username)->first();
}
public function validateCredentials(Authenticatable $user, array $credentials)
{
print_r([__LINE__ => $credentials]);
}
}