Complete but Simple API System with JWT and Automatic documentation genertation.
Admin: admin@demo.com / 123456
Admin Partner: partner@demo.com / 123456
User: user@demo.com / 123456
composer install
then create databse connection
php bin/console doctrine:database:create
and migrate
php bin/console doctrine:migrations:migrate -- allow-no-migration
// Header
{
"cty": "JWT",
"Token": "FirstAuthAPI",
"alg": "HS256",
"typ": "JWT"
}
// Payload
{
"iss": "API Authenticator",
"sub": "api-access-token",
"aud": "https://yourapi.com",
"exp": 1604102400,
"iat": 1572512942,
"jti": "349c18a0c316835e63fe0c737a6dca68",
"user": {
"login": "xxx@xxx.xxx",
"roles": [
"ROLE_ADMIN",
"ROLE_USER"
],
"privileges": [
"GET",
"POST",
"PUT",
"DELETE"
]
}
}
@bZez | sam@bzez.dev