Skip to content

Commit

Permalink
Clarified hypothetical controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkGhostHunter authored Jan 19, 2023
1 parent 2ed7cde commit 3291c57
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ const webAuthn = new WebAuthn({}, {

Attestation is the _ceremony_ to create WebAuthn Credentials. To create an Attestable Response that the user device can understand, use the `AttestationRequest::toCreate()` form request.

For example, we can create our own `AttestationController` to create it.

```php
// app\Http\Controllers\WebAuthn\AttestationController.php
use Laragear\WebAuthn\Http\Requests\AttestationRequest;
Expand Down Expand Up @@ -354,6 +356,8 @@ The Assertion procedure also follows a two-step procedure: the user will input i

First, use the `AssertionRequest::toVerify()` form request. It will automatically create an assertion for the user that matches the credentials, or a blank one in case you're using [userless login](#userlessone-touchtypeless-login). Otherwise, you may set stricter validation rules to always ask for credentials.

For example, we can use our own `AssertionController` to handle it.

```php
// app\Http\Controllers\WebAuthn\AssertionController.php
use Laragear\WebAuthn\Http\Requests\AssertionRequest;
Expand Down

0 comments on commit 3291c57

Please sign in to comment.