Skip to content

Commit 50f1123

Browse files
authored
Merge pull request #8055 from cakephp/fix
Update authentication.rst
2 parents 0b24a71 + 8fb962b commit 50f1123

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

fr/tutorials-and-examples/cms/authentication.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,6 @@ Puis ajoutez le code suivant::
148148
'queryParam' => 'redirect',
149149
]);
150150

151-
// Charge les identifiants et s'assure que nous vérifions les champs e-mail et mot de passe
152-
$authenticationService->loadIdentifier('Authentication.Password', [
153-
'fields' => [
154-
'username' => 'email',
155-
'password' => 'password',
156-
]
157-
]);
158-
159151
// Charge les authenticators, nous voulons celui de session en premier
160152
$authenticationService->loadAuthenticator('Authentication.Session');
161153
// Configure la vérification des données du formulaire pour choisir l'email et le mot de passe
@@ -165,6 +157,14 @@ Puis ajoutez le code suivant::
165157
'password' => 'password',
166158
],
167159
'loginUrl' => Router::url('/users/login'),
160+
'identifier' => [
161+
'Authentication.Password' => [
162+
'fields' => [
163+
'username' => 'email',
164+
'password' => 'password',
165+
],
166+
],
167+
],
168168
]);
169169

170170
return $authenticationService;

ja/tutorials-and-examples/cms/authentication.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,6 @@ bcrypt は `PHPの推奨パスワードハッシュアルゴリズム <https://w
135135
'queryParam' => 'redirect',
136136
]);
137137

138-
// identifiers を読み込み、email と password のフィールドを確認します
139-
$authenticationService->loadIdentifier('Authentication.Password', [
140-
'fields' => [
141-
'username' => 'email',
142-
'password' => 'password',
143-
]
144-
]);
145-
146138
// authenticatorsをロードしたら, 最初にセッションが必要です
147139
$authenticationService->loadAuthenticator('Authentication.Session');
148140
// 入力した email と password をチェックする為のフォームデータを設定します
@@ -152,6 +144,14 @@ bcrypt は `PHPの推奨パスワードハッシュアルゴリズム <https://w
152144
'password' => 'password',
153145
],
154146
'loginUrl' => Router::url('/users/login'),
147+
'identifier' => [
148+
'Authentication.Password' => [
149+
'fields' => [
150+
'username' => 'email',
151+
'password' => 'password',
152+
],
153+
],
154+
],
155155
]);
156156

157157
return $authenticationService;

0 commit comments

Comments
 (0)