Skip to content
/ jose Public
forked from Spomky-Labs/jose

A PHP library for creation and loading of JWT

License

Notifications You must be signed in to change notification settings

Peercraft/jose

 
 

Repository files navigation

PHP JOSE Library

Scrutinizer Code Quality Coverage Status

Build Status StyleCI

HHVM Status PHP 7 ready

SensioLabsInsight

Latest Stable Version Total Downloads Latest Unstable Version License

This library aims to provide an implementation of:

Tests vectors from RFC 7520 are partially implemented.

Important note

This library provides all objects and components to perform signature, verification, encryption and decryption according to the RFCs listed above.

Some of classes provided are abstract and you must implement the missing methods. In addition, you will have to instantiate, initialize and inject all objects and components to the signer, encrypter and loader services.

You will be afraid of all of this and you will think that this library is very complicated to use. AND YOU ARE RIGHT!

That is why we created to other projects to ease the use of this library:

  • Jose Service: this project uses Pimple to provide only one service to rule them all.
  • Jose Bundle: a Symfony 2.7+ bundle that provides easy to use services

Finally, this library and all these projects are still in active development. Do not hesitate to send us your feedbacks!

Status of implementations

Please see this page.

The Release Process

The release process is described here.

Prerequisites

This library needs at least:

  • PHP 5.5.9+.

Please consider the following optional requirements:

  • AES-GCM based algorithms (AxxxGCM and AxxxGCMKW): PHP Crypto Extension (at least v0.2.1).

Continuous Integration

It has been successfully tested using PHP 5.5.9, PHP 5.6 and PHP 7 with all algorithms.

Some tests on HHVM were skipped because PHP Crypto is not yet supported. At the moment, you will not be able to use GCM algorithms on this platform.

We also track bugs and code quality using Scrutinizer-CI and Sensio Insight.

Coding Standards are verified by StyleCI.

Code coverage is analyzed by Coveralls.io.

Installation

The preferred way to install this library is to rely on Composer:

composer require spomky-labs/jose

By default, tests and documentation files are not included. If you want to test this project or read the documentation, please add the option --prefer-source.

composer require spomky-labs/jose --prefer-source

How to use

Your classes are ready to use? Have a look at How to use to create or load your first JWT objects.

Unsecured JWS

This library supports unsecured JWS (none algorithm).

Unsecured JWS is something you probably do not want to use. After you loaded data you received, you should verify that the algorithm used is not none.

Contributing

Requests for new features, bug fixed and all other ideas to make this library useful are welcome. Please follow these best practices.

Licence

This software is release under MIT licence.

About

A PHP library for creation and loading of JWT

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%