12
12
use Adldap \Laravel \Events \DiscoveredWithCredentials ;
13
13
use Adldap \Laravel \Events \AuthenticatedWithCredentials ;
14
14
use Illuminate \Support \Facades \Bus ;
15
- use Illuminate \Support \Facades \Event ;
16
15
use Illuminate \Support \Facades \Config ;
17
16
use Illuminate \Auth \EloquentUserProvider ;
18
17
use Illuminate \Contracts \Hashing \Hasher ;
@@ -104,7 +103,7 @@ public function retrieveByCredentials(array $credentials)
104
103
// Set the currently authenticating LDAP user.
105
104
$ this ->user = $ user ;
106
105
107
- Event:: fire (new DiscoveredWithCredentials ($ user ));
106
+ event (new DiscoveredWithCredentials ($ user ));
108
107
109
108
// Import / locate the local user account.
110
109
return Bus::dispatch (
@@ -126,7 +125,7 @@ public function validateCredentials(Authenticatable $model, array $credentials)
126
125
// If an LDAP user was discovered, we can go
127
126
// ahead and try to authenticate them.
128
127
if (Resolver::authenticate ($ this ->user , $ credentials )) {
129
- Event:: fire (new AuthenticatedWithCredentials ($ this ->user , $ model ));
128
+ event (new AuthenticatedWithCredentials ($ this ->user , $ model ));
130
129
131
130
// Here we will perform authorization on the LDAP user. If all
132
131
// validation rules pass, we will allow the authentication
@@ -142,15 +141,15 @@ public function validateCredentials(Authenticatable $model, array $credentials)
142
141
if ($ model ->wasRecentlyCreated ) {
143
142
// If the model was recently created, they
144
143
// have been imported successfully.
145
- Event:: fire (new Imported ($ this ->user , $ model ));
144
+ event (new Imported ($ this ->user , $ model ));
146
145
}
147
146
148
- Event:: fire (new AuthenticationSuccessful ($ this ->user , $ model ));
147
+ event (new AuthenticationSuccessful ($ this ->user , $ model ));
149
148
150
149
return true ;
151
150
}
152
151
153
- Event:: fire (new AuthenticationRejected ($ this ->user , $ model ));
152
+ event (new AuthenticationRejected ($ this ->user , $ model ));
154
153
}
155
154
156
155
// LDAP Authentication failed.
0 commit comments