This plugin provides a simple means of authentication within OctoberCMS using JSON Web Tokens (spec).
It based on JSON Web Token Authentication for Laravel & Lumen by Sean Tymon.
- RainLab.User plugin
- Extract this repository into plugins/autumn/jwtauth
- In plugins/autumn/jwtauth folder run
composer install
. - Run
php artisan vendor:publish --provider="Autumn\JWTAuth\ServiceProvider"
command. - Run
php artisan jwt:generate
command.
This plugin provides the following api endpoints:
Expects 2 parameters to receive: email and password. It authenticates the user via their credentials, and returns a token corresponding to that user if succeeded.
Expects 3 parameters to receive: username, email and password. It tries to create a user and returns a token corresponding to that user if succeeded.
Provide the basic logout functionality.