Download the PHP package ociomercado/laravel-jwt without Composer
On this page you can find all versions of the php package ociomercado/laravel-jwt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ociomercado/laravel-jwt
More information about ociomercado/laravel-jwt
Files in ociomercado/laravel-jwt
Package laravel-jwt
Short Description A simple Laravel package that implements a Provider, Middleware and Facade for JWT using lcobucci/jwt library to generate and check the tokens.
License MIT License
Informations about the package laravel-jwt
laravel-jwt
A simple Laravel package that implements a Provider
, Middleware
and Facade
for JWT
using lcobucci/jwt library to generate and check the tokens.
Dependencies
This library requires:
- PHP 5.5+
- OpenSSL Extension
Installation
Using composer:
Configuration
Provider
You need to update your config/app.php
file and add the following code in the providers
section:
Alias
Also, you need to add the following in the aliases
section:
Config file
Then you need to publish the configuration file so you customize the options:
This will create the config file jwt.php
in the /config
folder. Don't forget to check it out and change the options as you need.
Using the library
Protecting routes
Now you can use the JWT
middleware to protect your routes:
The middleware
checks if the request
has a Authorization
header or the parameter token
sent via GET
or POST
.
The JWT
class
All versions of laravel-jwt with dependencies
illuminate/support Version ^5.2
illuminate/http Version ^5.2
illuminate/contracts Version ^5.2