Skip to content
Exemple of use one JWT by request
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
client
web
.gitignore
LICENSE
README.md
composer.json
composer.lock
decodeJwt.php
makeJwt.php

README.md

Generate Key

openssl genrsa -des3 -out privkey.pem 2048

openssl rsa -in privkey.pem -outform PEM -pubout -out public.pem

Installation

Use composer for install the dependencies.

php composer install -o

Single file

The file makeJwt.php write an file named token_<uniqid> with the token JWT into.

The file decodeJwt.php can read and check the token written by the makeJwt.php file. Before use, change the name of the JWT token file at ligne 16.

Client / Server version

The server Application is based on Silex. The JWT token validation work with MiddleWare executed before the routing component.

This solution is not completed. You cannot use the embeded User Control Access.

Read the branch with_guard for most avanced use.

You can’t perform that action at this time.