Skip to content

Commit

Permalink
Merge pull request #656 from umer936/docs_update_for_const_location
Browse files Browse the repository at this point in the history
The CREDENTIAL_* consts are in AbstractIdentifier. Fix docs to match.
  • Loading branch information
markstory authored Dec 26, 2023
2 parents 67e07bf + 8f5fa12 commit 0f647ec
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions docs/es/authenticators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -276,17 +276,17 @@ se desconecta explícitamente vía ``AuthenticationComponent::logout()``, la coo

// Reuse fields in multiple authenticators.
$fields = [
IdentifierInterface::CREDENTIAL_USERNAME => 'email',
IdentifierInterface::CREDENTIAL_PASSWORD => 'password',
AbstractIdentifier::CREDENTIAL_USERNAME => 'email',
AbstractIdentifier::CREDENTIAL_PASSWORD => 'password',
];

// Put form authentication first so that users can re-login via
// the login form if necessary.
$service->loadAuthenticator('Authentication.Form', [
'loginUrl' => '/users/login',
'fields' => [
IdentifierInterface::CREDENTIAL_USERNAME => 'email',
IdentifierInterface::CREDENTIAL_PASSWORD => 'password',
AbstractIdentifier::CREDENTIAL_USERNAME => 'email',
AbstractIdentifier::CREDENTIAL_PASSWORD => 'password',
],
]);
// Then use sessions if they are active.
Expand Down
6 changes: 3 additions & 3 deletions docs/es/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ de clase::
use Authentication\AuthenticationService;
use Authentication\AuthenticationServiceInterface;
use Authentication\AuthenticationServiceProviderInterface;
use Authentication\Identifier\IdentifierInterface;
use Authentication\Identifier\AbstractIdentifier;
use Authentication\Middleware\AuthenticationMiddleware;
use Cake\Http\MiddlewareQueue;
use Cake\Routing\Router;
Expand Down Expand Up @@ -76,8 +76,8 @@ el ``AuthenticationService`` que quiere usar. Agregue el siguiente método a su
]);

$fields = [
IdentifierInterface::CREDENTIAL_USERNAME => 'email',
IdentifierInterface::CREDENTIAL_PASSWORD => 'password'
AbstractIdentifier::CREDENTIAL_USERNAME => 'email',
AbstractIdentifier::CREDENTIAL_PASSWORD => 'password'
];
// Load the authenticators. Session should be first.
$service->loadAuthenticator('Authentication.Session');
Expand Down
8 changes: 4 additions & 4 deletions docs/fr/authenticators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -349,17 +349,17 @@ détruit**. Un exemple de configuration serait::

// Réutiliser les champs dans plusieurs authentificateurs.
$fields = [
IdentifierInterface::CREDENTIAL_USERNAME => 'email',
IdentifierInterface::CREDENTIAL_PASSWORD => 'password',
AbstractIdentifier::CREDENTIAL_USERNAME => 'email',
AbstractIdentifier::CREDENTIAL_PASSWORD => 'password',
];

// Placer l'authentification par formulaire en premier de façon à ce que les
// utilisateurs puissent se reconnecter via le formulaire si besoin.
$service->loadAuthenticator('Authentication.Form', [
'loginUrl' => '/users/login',
'fields' => [
IdentifierInterface::CREDENTIAL_USERNAME => 'email',
IdentifierInterface::CREDENTIAL_PASSWORD => 'password',
AbstractIdentifier::CREDENTIAL_USERNAME => 'email',
AbstractIdentifier::CREDENTIAL_PASSWORD => 'password',
],
]);
// Ensuite utiliser les sessions si elles sont actives.
Expand Down
6 changes: 3 additions & 3 deletions docs/fr/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ authentification. Tout d'abord, mettons en place le middleware. Dans votre
use Authentication\AuthenticationService;
use Authentication\AuthenticationServiceInterface;
use Authentication\AuthenticationServiceProviderInterface;
use Authentication\Identifier\IdentifierInterface;
use Authentication\Identifier\AbstractIdentifier;
use Authentication\Middleware\AuthenticationMiddleware;
use Cake\Http\MiddlewareQueue;
use Cake\Routing\Router;
Expand Down Expand Up @@ -98,8 +98,8 @@ utiliser. Ajoutez la méthode suivante à votre **src/Application.php**::
]);

$fields = [
IdentifierInterface::CREDENTIAL_USERNAME => 'email',
IdentifierInterface::CREDENTIAL_PASSWORD => 'password'
AbstractIdentifier::CREDENTIAL_USERNAME => 'email',
AbstractIdentifier::CREDENTIAL_PASSWORD => 'password'
];
// Chargez les authentificateurs. Session est censé figurer en premier.
$service->loadAuthenticator('Authentication.Session');
Expand Down
6 changes: 3 additions & 3 deletions docs/ja/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ CakePHPから `composer <https://getcomposer.org/>`_ でプラグインをイン
use Authentication\AuthenticationService;
use Authentication\AuthenticationServiceInterface;
use Authentication\AuthenticationServiceProviderInterface;
use Authentication\Identifier\IdentifierInterface;
use Authentication\Identifier\AbstractIdentifier;
use Authentication\Middleware\AuthenticationMiddleware;
use Cake\Http\MiddlewareQueue;
use Psr\Http\Message\ServerRequestInterface;
Expand Down Expand Up @@ -69,8 +69,8 @@ CakePHPから `composer <https://getcomposer.org/>`_ でプラグインをイン
]);

$fields = [
IdentifierInterface::CREDENTIAL_USERNAME => 'email',
IdentifierInterface::CREDENTIAL_PASSWORD => 'password'
AbstractIdentifier::CREDENTIAL_USERNAME => 'email',
AbstractIdentifier::CREDENTIAL_PASSWORD => 'password'
];

// 認証者を読み込みます。セッションを優先してください。
Expand Down

0 comments on commit 0f647ec

Please sign in to comment.