You should implements the following interface and bind it.
- First, publish the package asserts: Configuration and Service Provider.
php artisan vendor:publish --tag=simple-jwt
- You should implement the following interfaces:
Lapix\SimpleJwt\SubjectRepository
Lapix\SimpleJwt\ClaimsHandler
-
Add the service provider to the file
/config/app.php
. -
Generate a new key pair using the command
php artisan simple-jwt:keys
and add the following environment variables:
- JWT_PRIVATE_KEYS: Private key.
- JWT_PUBLIC_KEYS: Public key.
- JWT_IDS: An arbitrary value, it used to identify the key.
- Change the configuration in the file
config/simple-jwt.php
as you want.