PHP code example of rluders / jwtauth
1. Go to this page and download the library: Download rluders/jwtauth library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rluders / jwtauth example snippets
// In another plugin's boot() method
Event::listen('rluders.jwtauth.customClaims', function (&$claims, $user) {
$claims['role'] = $user->role;
$claims['org'] = $user->organisation_id;
});
json
{
"error": invalid_activation_code | invalid_user | user_not_found
}
json
{
"error":
invalid_reset_password_code | invalid_user | invalid_reset_password_code
}