Skip to content

Commit

Permalink
Document session.token
Browse files Browse the repository at this point in the history
  • Loading branch information
octoberapp committed May 8, 2023
1 parent 71b8673 commit 26f1cc1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,25 @@ Route::group(['middleware' => \RainLab\User\Classes\AuthMiddleware::class], func
});
```

### Token Variable

The `token` Twig variable can be used for generating a new bearer token for the signed in user.

```twig
{% do response(
ajaxHandler('onSignin').withVars({
token: session.token()
})
) %}
```

The `checkToken` property of the component is used to verify a supplied token in the request headers `(Authorization: Bearer <TOKEN>)`.

```ini
[session]
checkToken = 1
```

## Account Component

The account component provides a user sign in form, registration form, activation form and update form. To display the form:
Expand Down

0 comments on commit 26f1cc1

Please sign in to comment.