Download the PHP package eljam/guzzle-jwt-middleware without Composer

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

Guzzle Jwt middleware

Build Status Code Quality Code Coverage SensioLabsInsight Latest Unstable Version Latest Stable Version Downloads license

Introduction

Works great with LexikJWTAuthenticationBundle

Installation

composer require eljam/guzzle-jwt-middleware

Usage

Auth Strategies

QueryAuthStrategy

FormAuthStrategy

HttpBasicAuthStrategy

JsonAuthStrategy

Persistence

To avoid requesting a token everytime php runs, you can pass to JwtManager an implementation of TokenPersistenceInterface. By default NullTokenPersistence will be used.

Simpe cache adapter (PSR-16)

If you have any PSR-16 compatible cache, you can use it as a persistence handler:

Optionnally you can specify the TTL and cache key used:

Custom persistence

You may create you own persistence handler by implementing the TokenPersistenceInterface:

Token key

Property accessor

With the property accessor you can point to a node in your json.

Json Example:

Library configuration:

Default behavior

By default this library assumes your json response has a key token, something like this:

but now you can change the token_key in the JwtManager options:

Authorization Header Type

Some endpoints use different Authorization header types (Bearer, JWT, etc...).

The default is Bearer, but another type can be supplied in the middleware:

Cached token

To avoid too many calls between multiple request, there is a cache system.

Json example:

The bundle natively supports the exp field in the JWT payload.


All versions of guzzle-jwt-middleware with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4.0
guzzlehttp/guzzle Version ^7.0
psr/simple-cache Version ^1 || ^2 || ^3
symfony/options-resolver Version >=2.8
symfony/property-access Version >=2.8
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 eljam/guzzle-jwt-middleware contains the following files

Loading the files please wait ....