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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php
namespace Adldap\Laravel\Resolvers;
use Adldap\AdldapInterface;
use Adldap\Models\User;
use Adldap\Query\Builder;
use Illuminate\Contracts\Auth\Authenticatable;
interface ResolverInterface
{
/**
* Constructor.
*
* @param AdldapInterface $ldap
*/
public function __construct(AdldapInterface $ldap);
/**
* Sets the LDAP connection to use.
*
* @param string $connection
*
* @return void
*/
public function setConnection($connection);
/**
* Retrieves a user by the given identifier.
*
* @param string $identifier The users object GUID.
*
* @return \Adldap\Models\Model|null
*/
public function byId($identifier);
/**
* Retrieve a user by the given credentials.
*
* @param array $credentials The users credentials
*
* @return \Adldap\Models\User|null
*/
public function byCredentials(array $credentials = []);
/**
* Retrieve a user by the given model.
*
* @param Authenticatable $model The users eloquent model
*
* @return \Adldap\Models\User|null
*/
public function byModel(Authenticatable $model);
/**
* Authenticates the user against the current provider.
*
* @param User $user The LDAP users model
* @param array $credentials The LDAP users credentials
*
* @return bool
*/
public function authenticate(User $user, array $credentials = []);
/**
* Returns a new user query.
*
* @return \Adldap\Query\Builder
*/
public function query(): Builder;
/**
* Retrieves the configured LDAP users username attribute.
*
* @return string
*/
public function getLdapDiscoveryAttribute(): string;
/**
* Retrieves the configured LDAP users authenticatable username attribute.
*
* @return string
*/
public function getLdapAuthAttribute(): string;
/**
* Retrieves the configured database username attribute.
*
* @return string
*/
public function getDatabaseUsernameColumn(): string;
/**
* Retrieves the configured database identifier attribute.
*
* @return string
*/
public function getDatabaseIdColumn(): string;
}