damianbatson / laravel-tokenauth

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel-tokenauth experiment

Build Status Total Downloads Latest Stable Version Latest Unstable Version License

Laravel 5.1 auth using JSON web tokens (JWTs).

uses tymons jwt-auth on the PHP to generate a JWT which stored on the client side using satellizer.

view app/Http/Controllers/TokenAuthController.php for PHP login and public/js/AuthController.js for javascript.

the client-side uses a then promise with error handling to authenticate the user and parse the data to the laravel API.

on the Laravel side, the JWT library exceptions are used in a series of try/catch blocks to determine the validity of the tokens.

About


Languages

Language:PHP 90.0%Language:JavaScript 6.0%Language:HTML 3.4%Language:ApacheConf 0.6%Language:CSS 0.1%