Skip to content

Commit 46ab0a2

Browse files
add console feature, now the user can generate the classes to override defaults in TokensValidation using the commande artisan.
1 parent 7dad3e2 commit 46ab0a2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,14 @@ $confirmationToken = TokensValidation::createNewConfirmationToken(
303303
);
304304
```
305305

306+
307+
To check it :
308+
```PHP
309+
$result = TokensValidation::checkConfirmationCode(code: $token, whatFor: "email-confirmation");
310+
```
311+
312+
If the "whatFor" parameter does not match the intended purpose of the confirmation code, the validation process will fail.
313+
306314
#### Single Token Per Period:
307315
To avoid creating multiple confirmation code at the same moment (before expiration),
308316
you can set "**singleTokenPerTime**" parameter to true when calling the **createNewConfirmationToken** function.
@@ -319,14 +327,6 @@ $confirmationToken = TokensValidation::createNewConfirmationToken(
319327
);
320328
```
321329

322-
323-
To check it :
324-
```PHP
325-
$result = TokensValidation::checkConfirmationCode(code: $token, whatFor: "email-confirmation");
326-
```
327-
328-
If the "whatFor" parameter does not match the intended purpose of the confirmation code, the validation process will fail.
329-
330330
### Tokens generator
331331

332332
You can modify the behavior of the token and confirmation code generator by creating a new class that extends the **AuthTokenGenerator::class** and **ConfirmationCodeGenerator::class**. This allows you to customize the functionality of the generator to meet the specific needs of your project.

0 commit comments

Comments
 (0)