JWT authentication tutorial

Comparing #3 with #4

Revision #4 was created by Allan Jensen Allan Jensen on Oct 3, 2021, 5:59:50 PM.

Added parent behaviors

Content

[...]
- Add the authenticator behavior to your controllers
- For `AuthController.php` we must exclude actions that do not require being authenticated, like `login`, `refresh-token`, `options` (when browser sends the cross-site OPTIONS request).

```php
public function behaviors() {
     $behaviors = parent::behaviors();
 
 
$behaviors['authenticator'] = [
'class' => \sizeg\jwt\JwtHttpBearerAuth::class,
'except' => [
'login',
'refresh-token',
'options',
[...]