Skip to content

GoApptiv/jwt-laravel-package

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

GoApptiv/JWT

JWT Package is used to verify and generate JWT Token.

Installation

Add the following code in the composer to install this package into your Laravel Project

"require": {
        ...
        "goapptiv/jwt": "^2.0"

    }
 "repositories": [
        {
            "type": "git",
            "url": "https://github.com/GoApptiv/jwt-laravel-package"
        }
    ]

Add the Token Key in your .env file.

TOKEN_SECRET_KEY=

Usage

Decrypting a Token

use GoApptiv\JWT\JWT;

JWT::decrypt($token);

Encrypting Data

use GoApptiv\JWT\JWT;

JWT::encrypt($data);