Skip to content

JSON Web Token Authentication plugin for OctoberCMS.

Notifications You must be signed in to change notification settings

gpasztor87/oc-jwt-auth

Repository files navigation

JWT-Auth plugin

Build Status Scrutinizer Code Quality StyleCI

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.

Requirements

Installation

  • 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.

Usage

This plugin provides the following api endpoints:

/api/auth/login

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.

/api/auth/register

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.

/api/auth/logout

Provide the basic logout functionality.

About

JSON Web Token Authentication plugin for OctoberCMS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages