Skip to content

JimTools/jwt-auth-example

Repository files navigation

Slim Framework 4 Skeleton with JWT

This is a reference implementation of jimtools/jwt-auth with Slim Skeleton.

Setup

cp .env.example .env
composer install
composer start

Points of Interest

  • All routes are protected apart from /auth/login, this will return a JWT to set in the request Authorization header
    • /auth/me will display the JWT claims
  • See dependencies.php for basic setup in the container
  • See HttpErrorHandler.php:62 for authentication error handling.

Extra

For more information please read the documentation for jwt-auth and Slim Framework

Please note while this reference implementation uses Slim, the middleware is PSR-15 compliant and can be used with any framework that supports PSR-15 middleware such as Mezzio.

About

reference implementation of jimtools/jwt-auth

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages