Skip to content
Complete JWT Api system w/ Front & Back
PHP HTML CSS JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
bin
config
public
src
templates
.env
.gitignore
ALTER
CREATE
Demo-APIJWT.gif
README.md
composer.json
composer.lock
symfony.lock

README.md

SF4-Simple-JWT-Auth-API

Complete but Simple API System with JWT and Automatic documentation genertation.

Demo

Demo

https://api.bzez.dev/

Admin: admin@demo.com / 123456

Admin Partner: partner@demo.com / 123456

User: user@demo.com / 123456

Installation

composer install

then create databse connection

php bin/console doctrine:database:create

and migrate

php bin/console doctrine:migrations:migrate -- allow-no-migration

JWT Structure

// 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"
    ]
  }
}

Support

@bZez | sam@bzez.dev

You can’t perform that action at this time.