Download the PHP package malvik-lab/laravel-jwt without Composer

On this page you can find all versions of the php package malvik-lab/laravel-jwt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-jwt

Laravel JWT

Laravel JWT is an open-source library for Laravel that adds JWT authentication to your project.
JWT is a token-based authentication method that is secure, lightweight, and easy to implement. The library is easy to use and can be configured in minutes. It provides a range of features for JWT authentication, including:

Pre-installation (not mandatory)

JWT uses a pair of public and private keys to sign and verify tokens. The public key is used to verify tokens on the client side, while the private key is used to sign tokens on the server side.

The library by default stores the public and private keys in a folder called keys in the root of your project. You can change the location of this folder by adding the following to your .env file:

Library installation

This command will install the library and all its dependencies.

Publishing the configuration

This file contains the library configuration, such as the token signing method, token lifetime, and JWT key path.

Migration publication

This file creates the jwt_tokens table in your database. This table is used to store issued JWT tokens.

Running the migration

This command will create the jwt_tokens table in your database.

JWT key generation

this command will generate a public and private key pair, which will be used to sign and verify JWT tokens.

Add Guards

Add new guards to auth configuration file.

Enable API authentication with JWT

Routes

To test JWT authentication, you can add routes to your project that allow you to authenticate with a valid JWT token.

Controller

For basic use you can use MalvikLab\LaravelJwt\Http\Controllers\AuthController (as in the previous example) or use a custom controller for greater control of the authentication logic.

Recommended but not mandatory

To ensure a JSON response is always returned, it is recommended to do the following:

Add render method

Add AcceptJson middleware

Installation complete

Now that you have installed the Laravel JWT library, you can start using its features. Here are some examples of requests and responses that you can use to test JWT authentication.

Login

Request

Response

Me

Request

Response

Refresh token

Request

Response (Same as the login response)

Logout

Request

Response


All versions of laravel-jwt with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
firebase/php-jwt Version ^6.8
illuminate/auth Version ^10.24
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package malvik-lab/laravel-jwt contains the following files

Loading the files please wait ....