Download the PHP package reactphp-x/jwt without Composer
On this page you can find all versions of the php package reactphp-x/jwt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package jwt
ReactPHP JWT Microservice
A simple and efficient JWT (JSON Web Token) microservice built for ReactPHP register-center. This package provides JWT generation and verification services through microservice architecture.
Installation
Features
- JWT token generation with customizable claims
- JWT token verification
- Microservice architecture with register-center integration
- Built with firebase/php-jwt for reliable JWT operations
- Comprehensive test coverage
Usage
Register the Service
Using the Service
From another service, you can use the JWT service like this:
Response Format
All methods return a consistent response format:
-
Success response:
- Error response:
Configuration
The JwtService constructor accepts the following parameters:
key(string): The secret key used for signing tokensalgorithm(string, optional): The algorithm to use for signing (default: 'HS256')expirationTime(int, optional): Token expiration time in seconds (default: 3600)
Development
Running Tests
The test suite includes:
- Token generation tests
- Token verification tests
- Invalid token handling
- Expired token handling
- Custom algorithm tests
Dependencies
-
Required:
- firebase/php-jwt: ^6.11
- Development:
- phpunit/phpunit: ^10.0
- reactphp-x/register-center: ^1.0
- monolog/monolog: ^3.9
License
MIT License
All versions of jwt with dependencies
PHP Build Version
Package Version
Requires
firebase/php-jwt Version
^6.11
The package reactphp-x/jwt contains the following files
Loading the files please wait ...