Download the PHP package nexmo/jwt without Composer

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

JWT Client Library for PHP

Build Status Latest Stable Version codecov

Nexmo is now known as Vonage

This library requires a minimum PHP version of 7.1

This is the PHP library for generating JWTS to use Nexmo's API. To use this, you'll need a Nexmo account. Sign up for free at nexmo.com.

Installation

To use the client library you'll need to have created a Nexmo account.

To install the PHP client library to your project, we recommend using Composer.

You don't need to clone this repository to use this library in your own projects. Use Composer to install it from Packagist.

If you're new to Composer, here are some resources that you may find useful:

Usage

If you're using Composer, make sure the autoloader is included in your project's bootstrap file:

Create a Token Generator with the Application ID and Private Key of the Nexmo Application you want to access:

You can then retrieve a generated JWT token by calling the generate() method on the Token Generator:

This will return a string token that can be used for Bearer Authentication to Nexmo APIs that require JWTs.

Examples

Generating a token with a specific Time To Live

By default, Nexmo JWT tokens are generated with an Time To Live, or TTL, of 15 minutes after generation. In cases where the token lifetime should be different, you can override this setting by calling the setTTL() method on the Token Generator and passing the length of seconds that the token should be valid for

Setting ACLs

Nexmo JWTs will default to full access to all of the paths for an application, but this may not be desirable for cases where clients may need restricted access. You can specify the paths that a JWT token is valid for by using the setPaths() or addPath() methods to set the path information in bulk, or add individual paths in a more fluent interface.

For more information on assigning ACL information, please see How to generate JWTs on the Nexmo Developer Platform

Contributing

This library is actively developed and we love to hear from you! Please feel free to create an issue or open a pull request with your questions, comments, suggestions and feedback.


All versions of jwt with dependencies

PHP Build Version
Package Version
Requires lcobucci/jwt Version ^3.3
ramsey/uuid Version ^3.9
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 nexmo/jwt contains the following files

Loading the files please wait ....