|
7 | 7 | | Connection |
8 | 8 | |-------------------------------------------------------------------------- |
9 | 9 | | |
10 | | - | The connection to use for authentication. |
| 10 | + | The LDAP connection to use for laravel authentication. |
11 | 11 | | |
12 | 12 | | You must specify connections in your `config/adldap.php` configuration file. |
13 | 13 | | |
|
26 | 26 | | attribute to discover the user by. The reason for this is to hide |
27 | 27 | | the attribute that you're using to login users. |
28 | 28 | | |
29 | | - | For example, if your HTML input name is `email` and you'd like users |
30 | | - | to login by their LDAP `mail` attribute, then keep the |
31 | | - | configuration below. However, if you'd like to login users |
32 | | - | by their usernames, then change `mail` to `samaccountname`. |
33 | | - | and `email` to `username`. |
| 29 | + | For example, if your HTML input name is `email` and you'd like users to login |
| 30 | + | by their LDAP `mail` attribute, then keep the configuration below. However, |
| 31 | + | if you'd like to login users by their usernames, then change `mail` |
| 32 | + | to `samaccountname`. and `email` to `username`. |
34 | 33 | | |
35 | 34 | | This must be an array with a key - value pair. |
36 | 35 | | |
|
46 | 45 | | The limitation filter allows you to enter a raw filter to only allow |
47 | 46 | | specific users / groups / ous to authenticate. |
48 | 47 | | |
49 | | - | This should be a standard LDAP filter. |
| 48 | + | For an example, to only allow users inside of a group |
| 49 | + | named 'Accounting', you would insert the Accounting |
| 50 | + | groups full distinguished name inside the filter: |
| 51 | + | |
| 52 | + | '(memberof=cn=Accounting,dc=corp,dc=acme,dc=org)' |
| 53 | + | |
| 54 | + | This value must be a standard LDAP filter. |
50 | 55 | | |
51 | 56 | */ |
52 | 57 |
|
|
91 | 96 | | |
92 | 97 | | The password sync option allows you to automatically synchronize |
93 | 98 | | users AD passwords to your local database. These passwords are |
94 | | - | hashed natively by laravel. |
| 99 | + | hashed natively by laravel using the bcrypt() method. |
95 | 100 | | |
96 | 101 | | Enabling this option would also allow users to login to their |
97 | 102 | | accounts using the password last used when an AD connection |
|
155 | 160 | | Bind User to Model |
156 | 161 | |-------------------------------------------------------------------------- |
157 | 162 | | |
158 | | - | The bind user to model option allows you to access the Adldap user model |
159 | | - | instance on your laravel database model to be able run operations |
160 | | - | or retrieve extra attributes on the Adldap user model instance. |
| 163 | + | The 'bind user to model' option allows you to access the authenticated |
| 164 | + | Adldap user model instance on your laravel User model. |
161 | 165 | | |
162 | 166 | | If this option is true, you must insert the trait: |
163 | 167 | | |
164 | 168 | | `Adldap\Laravel\Traits\AdldapUserModelTrait` |
165 | 169 | | |
166 | | - | Onto your User model configured in `config/auth.php`. |
| 170 | + | Onto your User model that is configured in `config/auth.php`. |
167 | 171 | | |
168 | 172 | | Then use `Auth::user()->adldapUser` to access. |
169 | 173 | | |
|
185 | 189 | | The array key represents the Laravel model key, and the value |
186 | 190 | | represents the Active Directory attribute to set it to. |
187 | 191 | | |
188 | | - | Your login attribute is already synchronized and does not need to be |
189 | | - | added to this array. |
| 192 | + | Your login attribute (configured above) is already synchronized |
| 193 | + | and does not need to be added to this array. |
190 | 194 | | |
191 | 195 | */ |
192 | 196 |
|
|
206 | 210 | | If no attributes are given inside the array, all attributes on the |
207 | 211 | | user are selected. |
208 | 212 | | |
| 213 | + | This is configurable to allow for faster LDAP queries, rather |
| 214 | + | than retrieving all attributes on every login. |
| 215 | + | |
209 | 216 | | ** Note ** : Keep in mind you must include attributes that you would |
210 | 217 | | like to synchronize, as well as your login attribute. |
211 | 218 | | |
|
0 commit comments