Download the PHP package byjg/jwt-wrapper without Composer

On this page you can find all versions of the php package byjg/jwt-wrapper. 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 jwt-wrapper

Jwt-Wrapper for Firebase Jwt

Build Status Opensource ByJG GitHub source GitHub license GitHub release

A very simple wrapper for create, encode, decode JWT Tokens and abstract the PHP JWT Component

How it works

This library is intented to be located at server side.

The flow is

Without Token:

Generate Token:

With token

Validate Token:

Create your Jwt Secret Key

You can use two type of secret keys. A Hash (HS512) that is faster, or a RSA (RS512) that is more secure.

Hash Key

RSA

Note: Save without password

Create JWT Token (Hash Encoding)

Create JWT Token (OpenSSL Encoding)

Extracting

Issuer validation

By default the issuer is validated against the server name. If you want to disable this validation you can call the method below:

Adding a Leeway

You can add a leeway to account for when there is a clock skew times between the signing and verifying servers. It is recommended that this leeway should not be bigger than a few minutes.

Important: Since the Firebase JWT class set the leeway value as a "static" property once you call the method above it will set up the same value to all JwtWrapper instances

Install

Running the tests

Running a sample test

Start a local server:

Access from you web browser the client.html

Dependencies


Open source ByJG


All versions of jwt-wrapper with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1 <8.4
firebase/php-jwt Version ^6
ext-openssl Version *
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 byjg/jwt-wrapper contains the following files

Loading the files please wait ....