File tree Expand file tree Collapse file tree 3 files changed +31
-32
lines changed
Expand file tree Collapse file tree 3 files changed +31
-32
lines changed Original file line number Diff line number Diff line change @@ -536,8 +536,10 @@ $service = new AuthenticationService();
536536// Define identifiers
537537$passwordIdentifier = [
538538 'className' => 'Authentication.Password',
539- 'username' => 'email',
540- 'password' => 'password'
539+ 'fields' => [
540+ 'username' => 'email',
541+ 'password' => 'password',
542+ ],
541543];
542544
543545// Load the authenticators leaving Basic as the last one.
Original file line number Diff line number Diff line change @@ -134,14 +134,13 @@ You’ll now have to configure it this way:
134134$service = new AuthenticationService();
135135
136136// Define identifier
137- $passwordIdentifier = [
138- 'Authentication.Password' => [
139- 'fields' => [
140- 'username' => 'email',
141- 'password' => 'password'
142- ]
143- ],
144- ];
137+ $passwordIdentifier = [
138+ 'className' => 'Authentication.Password',
139+ 'fields' => [
140+ 'username' => 'email',
141+ 'password' => 'password',
142+ ],
143+ ];
145144
146145// Load the authenticators. Session should be first.
147146$service->loadAuthenticator('Authentication.Session');
@@ -159,15 +158,14 @@ $service = new AuthenticationService();
159158
160159// Define identifier
161160$passwordIdentifier = [
162- 'Authentication.Password' => [
163- 'resolver' => [
164- 'className' => 'Authentication.Orm',
165- 'userModel' => 'Employees',
166- ],
167- 'fields' => [
168- 'username' => 'email',
169- 'password' => 'password'
170- ]
161+ 'className' => 'Authentication.Password',
162+ 'resolver' => [
163+ 'className' => 'Authentication.Orm',
164+ 'userModel' => 'Employees',
165+ ],
166+ 'fields' => [
167+ 'username' => 'email',
168+ 'password' => 'password',
171169 ],
172170];
173171```
Original file line number Diff line number Diff line change @@ -38,19 +38,18 @@ fallback hasher as follows:
3838
3939``` php
4040$passwordIdentifier = [
41- 'Authentication.Password' => [
42- // Other config options
43- 'passwordHasher' => [
44- 'className' => 'Authentication.Fallback',
45- 'hashers' => [
46- 'Authentication.Default',
47- [
48- 'className' => 'Authentication.Legacy',
49- 'hashType' => 'md5',
50- 'salt' => false, // turn off default usage of salt
51- ],
52- ]
53- ]
41+ 'className' => 'Authentication.Password',
42+ // Other config options
43+ 'passwordHasher' => [
44+ 'className' => 'Authentication.Fallback',
45+ 'hashers' => [
46+ 'Authentication.Default',
47+ [
48+ 'className' => 'Authentication.Legacy',
49+ 'hashType' => 'md5',
50+ 'salt' => false, // turn off default usage of salt
51+ ],
52+ ],
5453 ],
5554];
5655```
You can’t perform that action at this time.
0 commit comments