Download the PHP package kelvinmo/simplejwt without Composer

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

SimpleJWT

SimpleJWT is a simple JSON web token library written in PHP.

Latest Stable Version CI

Features

Requirements

Installation

You can install via Composer.

Usage

Key set

Keys used to sign or verify a JWT must firstly be added to a KeySet. You can add keys in the following ways:

  1. By loading a JSON object formatted as a JWK Set object as per RFC7517:

  2. By adding a key manually:

  3. For a secret used in HMAC signatures, directly:

Creating a JWT

To create a JWT, set up the desired headers and claims as separate arrays, then create a JWT object:

The JWT can then be signed and encoded:

By default, SimpleJWT will automatically include a kid (Key ID) header and a iat (Issued At) claim in all JWTs. If the key used to sign the JWT does not have a kid assigned (e.g. if it is imported from a PEM file), a kid is generated. You can disable this behaviour by specifying $auto_complete to false when calling SimpleJWT\JWT::encode().

Verifying a JWT

To consume and verify a JWT, use the decode function. Note that you will need to supply the expected alg parameter that has been previously agreed out-of-band.

Deserialising a JWT

You can also deserialise a JWT without verifying it using the deserialise function. Note that you should not trust the contents of the data contained in a JWT without verifying them.

Creating a JWE

To create a JWE, set up the desired header array and plaintext, then create a JWE object:

The JWE can then be encrypted:

Decrypting a JWE

To decrypt a JWE, use the decrypt function:

Licence

BSD 3 clause


All versions of simplejwt with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3 || ^8.0
ext-openssl Version *
ext-hash Version *
ext-gmp Version *
symfony/console Version ^5.0 || ^6.0 || ^7.0
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 kelvinmo/simplejwt contains the following files

Loading the files please wait ....