Skip to content

Commit b8ea11f

Browse files
samdarkgithub-actions[bot]
authored andcommitted
Update translation
1 parent 60bb745 commit b8ea11f

7 files changed

Lines changed: 329 additions & 280 deletions

File tree

‎_translations/po/es/guide_security_authentication.md.po‎

Lines changed: 62 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
msgid ""
77
msgstr ""
88
"Project-Id-Version: PACKAGE VERSION\n"
9-
"POT-Creation-Date: 2025-09-11 10:15+0500\n"
9+
"POT-Creation-Date: 2026-01-11 19:34+0000\n"
1010
"PO-Revision-Date: 2025-09-04 11:19+0500\n"
1111
"Last-Translator: Automatically generated\n"
1212
"Language-Team: none\n"
@@ -17,55 +17,66 @@ msgstr ""
1717
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
1818

1919
#. type: Title #
20-
#: ../../guide/en/security/authentication.md
20+
#: ../src/guide/security/authentication.md
2121
#, no-wrap
2222
msgid "Authentication"
2323
msgstr ""
2424

2525
#. type: Plain text
26-
#: ../../guide/en/security/authentication.md
26+
#: ../src/guide/security/authentication.md
2727
msgid "Authentication is the process of verifying the identity of a user. It usually uses an identifier (for example, a username or an email address) and a secret token (such as a password or an access token) to judge if the user is the one whom he claims as. Authentication is the basis of the login feature."
2828
msgstr ""
2929

3030
#. type: Plain text
31-
#: ../../guide/en/security/authentication.md
31+
#: ../src/guide/security/authentication.md
3232
msgid "Yii provides an authentication framework which wires up various components to support login. To use this framework, you mainly need to do the following work:"
3333
msgstr ""
3434

3535
#. type: Bullet: '* '
36-
#: ../../guide/en/security/authentication.md
37-
msgid "Configure the `Yiisoft\\Yii\\Web\\User\\User` service;"
36+
#: ../src/guide/security/authentication.md
37+
msgid "Configure the `Yiisoft\\User\\CurrentUser` service;"
3838
msgstr ""
3939

4040
#. type: Bullet: '* '
41-
#: ../../guide/en/security/authentication.md
41+
#: ../src/guide/security/authentication.md
4242
msgid "Create a class implementing the `\\Yiisoft\\Auth\\IdentityInterface` interface;"
4343
msgstr ""
4444

4545
#. type: Bullet: '* '
46-
#: ../../guide/en/security/authentication.md
46+
#: ../src/guide/security/authentication.md
4747
msgid "Create a class implementing the `\\Yiisoft\\Auth\\IdentityRepositoryInterface` interface;"
4848
msgstr ""
4949

50+
#. type: Plain text
51+
#: ../src/guide/security/authentication.md
52+
msgid "To use the `Yiisoft\\User\\CurrentUser` service, install [yiisoft/user](https://github.com/yiisoft/user) package:"
53+
msgstr ""
54+
55+
#. type: Fenced code block (shell)
56+
#: ../src/guide/security/authentication.md
57+
#, no-wrap
58+
msgid "composer require yiisoft/user\n"
59+
msgstr ""
60+
5061
#. type: Title ##
51-
#: ../../guide/en/security/authentication.md
62+
#: ../src/guide/security/authentication.md
5263
#, no-wrap
53-
msgid "Configuring `Yiisoft\\Yii\\Web\\User\\User` <span id=\"configuring-user\"></span>"
64+
msgid "Configuring `Yiisoft\\User\\CurrentUser`"
5465
msgstr ""
5566

5667
#. type: Plain text
57-
#: ../../guide/en/security/authentication.md
58-
msgid "The `Yiisoft\\Yii\\Web\\User\\User` application service manages the user authentication status. It depends on `Yiisoft\\Auth\\IdentityRepositoryInterface` that should return an instance of `\\Yiisoft\\Auth\\IdentityInterface` which has the actual authentication logic."
68+
#: ../src/guide/security/authentication.md
69+
msgid "The `Yiisoft\\User\\CurrentUser` application service manages the user authentication status. It depends on `Yiisoft\\Auth\\IdentityRepositoryInterface` that should return an instance of `\\Yiisoft\\Auth\\IdentityInterface` which has the actual authentication logic."
5970
msgstr ""
6071

6172
#. type: Fenced code block (php)
62-
#: ../../guide/en/security/authentication.md
73+
#: ../src/guide/security/authentication.md
6374
#, no-wrap
6475
msgid ""
6576
"use Yiisoft\\Session\\Session;\n"
6677
"use Yiisoft\\Session\\SessionInterface;\n"
6778
"use Yiisoft\\Auth\\IdentityRepositoryInterface;\n"
68-
"use Psr\\Container\\ContainerInterface;\n"
79+
"use Yiisoft\\Definitions\\Reference;\n"
6980
"\n"
7081
"return [\n"
7182
" // ...\n"
@@ -77,39 +88,36 @@ msgid ""
7788
" $params['session']['handler'] ?? null,\n"
7889
" ],\n"
7990
" ],\n"
80-
" \n"
81-
" \n"
82-
" // User:\n"
83-
" IdentityRepositoryInterface::class => static function (ContainerInterface $container) {\n"
84-
" // instead of a Cycle-based repository, you can use any implementation\n"
85-
" return $container->get(\\Cycle\\ORM\\ORMInterface::class)->getRepository(\\App\\Entity\\User::class);\n"
86-
" },\n"
91+
" IdentityRepositoryInterface::class => IdentityRepository::class,\n"
92+
" CurrentUser::class => [\n"
93+
" 'withSession()' => [Reference::to(SessionInterface::class)]\n"
94+
" ],\n"
8795
"];\n"
8896
msgstr ""
8997

9098
#. type: Title ##
91-
#: ../../guide/en/security/authentication.md
99+
#: ../src/guide/security/authentication.md
92100
#, no-wrap
93101
msgid "Implementing`\\Yiisoft\\Auth\\IdentityInterface` <span id=\"implementing-identity\"></span>"
94102
msgstr ""
95103

96104
#. type: Plain text
97-
#: ../../guide/en/security/authentication.md
105+
#: ../src/guide/security/authentication.md
98106
msgid "The identity class must implement the `\\Yiisoft\\Auth\\IdentityInterface` which has a single method:"
99107
msgstr ""
100108

101109
#. type: Bullet: '* '
102-
#: ../../guide/en/security/authentication.md
110+
#: ../src/guide/security/authentication.md
103111
msgid "[[yii\\web\\IdentityInterface::getId()|getId()]]: it returns the ID of the user represented by this identity instance."
104112
msgstr ""
105113

106114
#. type: Plain text
107-
#: ../../guide/en/security/authentication.md
115+
#: ../src/guide/security/authentication.md
108116
msgid "In the following example, an identity class is implemented as a pure PHP object."
109117
msgstr ""
110118

111119
#. type: Fenced code block (php)
112-
#: ../../guide/en/security/authentication.md
120+
#: ../src/guide/security/authentication.md
113121
#, no-wrap
114122
msgid ""
115123
"<?php\n"
@@ -133,33 +141,33 @@ msgid ""
133141
msgstr ""
134142

135143
#. type: Title ##
136-
#: ../../guide/en/security/authentication.md
144+
#: ../src/guide/security/authentication.md
137145
#, no-wrap
138146
msgid "Implementing`\\Yiisoft\\Auth\\IdentityRepositoryInterface` <span id=\"implementing-identity-repository\"></span>"
139147
msgstr ""
140148

141149
#. type: Plain text
142-
#: ../../guide/en/security/authentication.md
150+
#: ../src/guide/security/authentication.md
143151
msgid "The identity repository class must implement the `\\Yiisoft\\Auth\\IdentityRepositoryInterface` which has the following methods:"
144152
msgstr ""
145153

146154
#. type: Bullet: '* '
147-
#: ../../guide/en/security/authentication.md
155+
#: ../src/guide/security/authentication.md
148156
msgid "`findIdentity(string $id): ?IdentityInterface`: it looks for an instance of the identity class using the specified ID. This method is used when you need to keep the login status via session."
149157
msgstr ""
150158

151159
#. type: Bullet: '* '
152-
#: ../../guide/en/security/authentication.md
160+
#: ../src/guide/security/authentication.md
153161
msgid "`findIdentityByToken(string $token, string $type): ?IdentityInterface`: it looks for an instance of the identity class using the specified access token. This method is used when you need to authenticate a user by a single secret token (for example, in a stateless REST API)."
154162
msgstr ""
155163

156164
#. type: Plain text
157-
#: ../../guide/en/security/authentication.md
165+
#: ../src/guide/security/authentication.md
158166
msgid "A dummy implementation may look like the following:"
159167
msgstr ""
160168

161169
#. type: Fenced code block (php)
162-
#: ../../guide/en/security/authentication.md
170+
#: ../src/guide/security/authentication.md
163171
#, no-wrap
164172
msgid ""
165173
"namespace App\\User;\n"
@@ -206,26 +214,26 @@ msgid ""
206214
msgstr ""
207215

208216
#. type: Title ##
209-
#: ../../guide/en/security/authentication.md
217+
#: ../src/guide/security/authentication.md
210218
#, no-wrap
211-
msgid "Using `\\Yiisoft\\User\\User` <span id=\"using-user\"></span>"
219+
msgid "Using `\\Yiisoft\\User\\CurrentUser`"
212220
msgstr ""
213221

214222
#. type: Plain text
215-
#: ../../guide/en/security/authentication.md
216-
msgid "You can use `\\Yiisoft\\User\\User` service to get current user identity. As any service, it could be auto-wired in either action handler constructor or method:"
223+
#: ../src/guide/security/authentication.md
224+
msgid "You can use `\\Yiisoft\\User\\CurrentUser` service to get current user identity. As any service, it could be auto-wired in either action handler constructor or method:"
217225
msgstr ""
218226

219227
#. type: Fenced code block (php)
220-
#: ../../guide/en/security/authentication.md
228+
#: ../src/guide/security/authentication.md
221229
#, no-wrap
222230
msgid ""
223231
"use \\Psr\\Http\\Message\\ServerRequestInterface;\n"
224-
"use \\Yiisoft\\User\\User;\n"
232+
"use \\Yiisoft\\User\\CurrentUser;\n"
225233
"\n"
226234
"final readonly class SiteController\n"
227235
"{\n"
228-
" public function actionIndex(ServerRequestInterface $request, User $user)\n"
236+
" public function actionIndex(ServerRequestInterface $request, CurrentUser $user)\n"
229237
" { \n"
230238
" if ($user->isGuest()) {\n"
231239
" // user is guest\n"
@@ -238,75 +246,75 @@ msgid ""
238246
msgstr ""
239247

240248
#. type: Plain text
241-
#: ../../guide/en/security/authentication.md
249+
#: ../src/guide/security/authentication.md
242250
msgid "`isGuest()` determines if user is logged in or not. `getIdentity()` returns an instance of identity."
243251
msgstr ""
244252

245253
#. type: Plain text
246-
#: ../../guide/en/security/authentication.md
254+
#: ../src/guide/security/authentication.md
247255
msgid "To log in a user, you may use the following code:"
248256
msgstr ""
249257

250258
#. type: Fenced code block (php)
251-
#: ../../guide/en/security/authentication.md
259+
#: ../src/guide/security/authentication.md
252260
#, no-wrap
253261
msgid ""
254262
"$identity = $identityRepository->findByEmail($email);\n"
255263
"\n"
256-
"/* @var $user \\Yiisoft\\User\\User */\n"
264+
"/* @var $user \\Yiisoft\\User\\CurrentUser */\n"
257265
"$user->login($identity);\n"
258266
msgstr ""
259267

260268
#. type: Plain text
261-
#: ../../guide/en/security/authentication.md
269+
#: ../src/guide/security/authentication.md
262270
msgid "The `login()` method sets the identity to the User service. It stores identity into session so user authentication status is maintained."
263271
msgstr ""
264272

265273
#. type: Plain text
266-
#: ../../guide/en/security/authentication.md
274+
#: ../src/guide/security/authentication.md
267275
msgid "To log out a user, call"
268276
msgstr ""
269277

270278
#. type: Fenced code block (php)
271-
#: ../../guide/en/security/authentication.md
279+
#: ../src/guide/security/authentication.md
272280
#, no-wrap
273281
msgid ""
274-
"/* @var $user \\Yiisoft\\User\\User */\n"
282+
"/* @var $user \\Yiisoft\\User\\CurrentUser */\n"
275283
"$user->logout();\n"
276284
msgstr ""
277285

278286
#. type: Title ##
279-
#: ../../guide/en/security/authentication.md
287+
#: ../src/guide/security/authentication.md
280288
#, no-wrap
281289
msgid "Authentication Events <span id=\"auth-events\"></span>"
282290
msgstr ""
283291

284292
#. type: Plain text
285-
#: ../../guide/en/security/authentication.md
293+
#: ../src/guide/security/authentication.md
286294
msgid "The user service raises a few events during the login and logout processes."
287295
msgstr ""
288296

289297
#. type: Bullet: '* '
290-
#: ../../guide/en/security/authentication.md
298+
#: ../src/guide/security/authentication.md
291299
msgid "`\\Yiisoft\\User\\Event\\BeforeLogin`: raised at the beginning of `login()`. If the event handler calls `invalidate()` on an event object, the login process will be cancelled."
292300
msgstr ""
293301

294302
#. type: Bullet: '* '
295-
#: ../../guide/en/security/authentication.md
303+
#: ../src/guide/security/authentication.md
296304
msgid "`\\Yiisoft\\User\\Event\\AfterLogin`: raised after a successful login."
297305
msgstr ""
298306

299307
#. type: Bullet: '* '
300-
#: ../../guide/en/security/authentication.md
308+
#: ../src/guide/security/authentication.md
301309
msgid "`\\Yiisoft\\User\\Event\\BeforeLogout`: raised at the beginning of `logout()`. If the event handler calls `invalidate()` on an event object, the logout process will be cancelled."
302310
msgstr ""
303311

304312
#. type: Bullet: '* '
305-
#: ../../guide/en/security/authentication.md
313+
#: ../src/guide/security/authentication.md
306314
msgid "`\\Yiisoft\\User\\Event\\AfterLogout`: raised after a successful logout."
307315
msgstr ""
308316

309317
#. type: Plain text
310-
#: ../../guide/en/security/authentication.md
318+
#: ../src/guide/security/authentication.md
311319
msgid "You may respond to these events to implement features such as login audit, online user statistics. For example, in the handler for `\\Yiisoft\\User\\Event\\AfterLogin`, you may record the login time and IP address in the `user` database table."
312320
msgstr ""

0 commit comments

Comments
 (0)