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

Commit 68deaba

Browse files
committed
Remove AD references with LDAP
Due to supporting mutliple LDAP server types, removal of AD specific documentation should be removed.
1 parent 4575f1b commit 68deaba

File tree

6 files changed

+30
-28
lines changed

6 files changed

+30
-28
lines changed

docs/auth.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -634,16 +634,16 @@ class LdapAttributeHandler
634634
#### Password Synchronization
635635

636636
The password sync option allows you to automatically synchronize
637-
users AD passwords to your local database. These passwords are
637+
users LDAP passwords to your local database. These passwords are
638638
hashed natively by laravel.
639639

640640
Enabling this option would also allow users to login to their
641-
accounts using the password last used when an AD connection
641+
accounts using the password last used when an LDAP connection
642642
was present.
643643

644644
If this option is disabled, the local user account is applied
645645
a random 16 character hashed password, and will lose access
646-
to this account upon loss of AD connectivity.
646+
to this account upon loss of LDAP connectivity.
647647

648648
This feature is disabled by default.
649649

@@ -670,27 +670,29 @@ There are several events fired during each operation that takes place in Adldap2
670670
The login fallback option allows you to login as a local database user using the default Eloquent authentication
671671
driver if LDAP authentication fails. This option would be handy in environments where:
672672

673-
- You may have some active directory users and other users registering through the website itself (user does not exist in your AD).
674-
- Local development where your AD server may be unavailable
673+
- You may have some active directory users and other users registering through
674+
the website itself (user does not exist in your LDAP directory).
675+
- Local development where your LDAP server may be unavailable
675676

676677
To enable it, simply set the option to true in your `config/adldap_auth.php` configuration file:
677678

678679
```php
679680
'login_fallback' => env('ADLDAP_LOGIN_FALLBACK', true), // Set to true.
680681
```
681682

682-
#### Developing Locally without an AD connection
683+
#### Developing Locally without an LDAP connection
683684

684-
You can continue to develop and login to your application without a connection to your AD server in the following scenario:
685+
You can continue to develop and login to your application without a
686+
connection to your LDAP server in the following scenario:
685687

686688
* You have `auto_connect` set to `false` in your `adldap.php` configuration
687-
> This is necessary so we don't automatically try and bind to your AD server when your application boots.
689+
> This is necessary so we don't automatically try and bind to your LDAP server when your application boots.
688690
689691
* You have `login_fallback` set to `true` in your `adldap_auth.php` configuration
690692
> This is necessary so we fallback to the standard `eloquent` auth driver.
691693
692694
* You have `password_sync` set to `true` in your `adldap_auth.php` configuration
693-
> This is necessary so we can login to the account with the last password that was used when an AD connection was present.
695+
> This is necessary so we can login to the account with the last password that was used when an LDAP connection was present.
694696
695697
* You have logged into the synchronized LDAP account previously
696698
> This is necessary so the account actually exists in your local app's database.
@@ -703,9 +705,9 @@ application without a persistent connection to your LDAP server.
703705
Model binding allows you to attach the users LDAP model to their Eloquent
704706
model so their LDAP data is available on every request automatically.
705707

706-
> **Note**: Before we begin, enabling this option will perform a single query on your AD server for a logged
708+
> **Note**: Before we begin, enabling this option will perform a single query on your LDAP server for a logged
707709
in user **per request**. Eloquent already does this for authentication, however
708-
this could lead to slightly longer load times (depending on your AD
710+
this could lead to slightly longer load times (depending on your LDAP
709711
server and network speed of course).
710712

711713
To begin, insert the `Adldap\Laravel\Traits\HasLdapUser` trait onto your `User` model:
@@ -757,7 +759,7 @@ in some other means with Apache. Adldap2 does not set this up for you. To enable
757759
https://www.iis.net/configreference/system.webserver/security/authentication/windowsauthentication/providers/add
758760

759761
> **Note**: The WindowsAuthenticate middleware utilizes the `scopes` inside your `config/adldap.php` file.
760-
> A user may successfully authenticate against your AD server when visiting your site, but
762+
> A user may successfully authenticate against your LDAP server when visiting your site, but
761763
> depending on your scopes, may not be imported or logged in.
762764
763765
To use the middleware, insert it on your middleware stack inside your `app/Http/Kernel.php` file:
@@ -803,5 +805,5 @@ authentication enabled, IIS will set the PHP server variable `AUTH_USER`. This v
803805
is usually equal to the currently logged in users `samaccountname`.
804806

805807
The configuration array represents this mapping. The WindowsAuthenticate middleware will
806-
check if the server variable is set, and try to locate the user in your AD server
808+
check if the server variable is set, and try to locate the user in your LDAP server
807809
by their `samaccountname`.

docs/importing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ php artisan adldap:import --no-log
8383

8484
### Delete
8585

86-
The `--delete` (or `-d`) option allows you to soft-delete deactivated AD users. No users will
86+
The `--delete` (or `-d`) option allows you to soft-delete deactivated LDAP users. No users will
8787
be deleted if your User model does not have soft-deletes enabled.
8888

8989
```bash
@@ -92,7 +92,7 @@ php artisan adldap:import --delete
9292

9393
### Restore
9494

95-
The `--restore` (or `-r`) option allows you to restore soft-deleted re-activated AD users.
95+
The `--restore` (or `-r`) option allows you to restore soft-deleted re-activated LDAP users.
9696

9797
```bash
9898
php artisan adldap:import --restore

docs/quick-start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ This guide was created with the help of [@st-claude](https://github.com/st-claud
6666

6767
* Two files will be published inside your `config` folder, `adldap.php` and `adldap_auth.php`.
6868

69-
10. Modify the `config/adldap.php` file for your AD server configuration.
69+
10. Modify the `config/adldap.php` and `config/adldap_auth.php` files for your LDAP server configuration.
7070

7171
11. Run the command `php artisan make:auth` to scaffold login controllers and routes.
7272

src/Commands/Console/Import.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public function isLogging() : bool
155155

156156
/**
157157
* Returns true / false if users are being deleted
158-
* if their account is disabled in AD.
158+
* if their account is disabled in LDAP.
159159
*
160160
* @return bool
161161
*/
@@ -166,7 +166,7 @@ public function isDeleting() : bool
166166

167167
/**
168168
* Returns true / false if users are being restored
169-
* if their account is enabled in AD.
169+
* if their account is enabled in LDAP.
170170
*
171171
* @return bool
172172
*/
@@ -253,7 +253,7 @@ protected function save(User $user, Model $model) : bool
253253
}
254254

255255
/**
256-
* Restores soft-deleted models if their AD account is enabled.
256+
* Restores soft-deleted models if their LDAP account is enabled.
257257
*
258258
* @param User $user
259259
* @param Model $model
@@ -268,7 +268,7 @@ protected function restore(User $user, Model $model)
268268
$user->isEnabled()
269269
) {
270270
// If the model has soft-deletes enabled, the model is
271-
// currently deleted, and the AD user account
271+
// currently deleted, and the LDAP user account
272272
// is enabled, we'll restore the users model.
273273
$model->restore();
274274

@@ -281,7 +281,7 @@ protected function restore(User $user, Model $model)
281281
}
282282

283283
/**
284-
* Soft deletes the specified model if their AD account is disabled.
284+
* Soft deletes the specified model if their LDAP account is disabled.
285285
*
286286
* @param User $user
287287
* @param Model $model
@@ -298,7 +298,7 @@ protected function delete(User $user, Model $model)
298298
$user->isDisabled()
299299
) {
300300
// If deleting is enabled, the model supports soft deletes, the model
301-
// isn't already deleted, and the AD user is disabled, we'll
301+
// isn't already deleted, and the LDAP user is disabled, we'll
302302
// go ahead and delete the users model.
303303
$model->delete();
304304

src/Config/config.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
| Account Prefix
9393
|--------------------------------------------------------------------------
9494
|
95-
| The account prefix option is the prefix of your user accounts in AD.
95+
| The account prefix option is the prefix of your user accounts in LDAP directory.
9696
|
9797
| This string is prepended to authenticating users usernames.
9898
|
@@ -105,7 +105,7 @@
105105
| Account Suffix
106106
|--------------------------------------------------------------------------
107107
|
108-
| The account suffix option is the suffix of your user accounts in AD.
108+
| The account suffix option is the suffix of your user accounts in your LDAP directory.
109109
|
110110
| This string is appended to authenticating users usernames.
111111
|
@@ -134,7 +134,7 @@
134134
| Port
135135
|--------------------------------------------------------------------------
136136
|
137-
| The port option is used for authenticating and binding to your AD server.
137+
| The port option is used for authenticating and binding to your LDAP server.
138138
|
139139
*/
140140

@@ -190,7 +190,7 @@
190190
| Administrator Username & Password
191191
|--------------------------------------------------------------------------
192192
|
193-
| When connecting to your AD server, a username and password is required
193+
| When connecting to your LDAP server, a username and password is required
194194
| to be able to query and run operations on your server(s). You can
195195
| use any user account that has these permissions. This account
196196
| does not need to be a domain administrator unless you

src/Middleware/WindowsAuthenticate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function handle(Request $request, Closure $next)
7070
*/
7171
protected function retrieveAuthenticatedUser($username)
7272
{
73-
// Find the user in AD.
73+
// Find the user in LDAP.
7474
if ($user = $this->resolveUserByUsername($username)) {
7575
$provider = $this->auth->getProvider();
7676

@@ -81,7 +81,7 @@ protected function retrieveAuthenticatedUser($username)
8181
} elseif ($provider instanceof DatabaseUserProvider) {
8282
$credentials = $this->makeCredentials($user);
8383

84-
// Here we'll import the AD user. If the user already exists in
84+
// Here we'll import the LDAP user. If the user already exists in
8585
// our local database, it will be returned from the importer.
8686
$model = Bus::dispatch(
8787
new Import($user, $this->model(), $credentials)

0 commit comments

Comments
 (0)