{"repo":"adhocore/php-jwt","free":true,"listed":false,"github":"https://github.com/adhocore/php-jwt","clone":"git clone https://github.com/adhocore/php-jwt.git","description":"Ultra lightweight, dependency free and standalone JSON web token (JWT) library for PHP5.6 to PHP8.4+. This library makes JWT a cheese. It is a minimal JWT integration for PHP.","language":"PHP","stars":300,"topics":["php7","php-jwt","json-web-token","api-auth","jwt","jwt-auth","jwt-authentication","api-security","oauth2","json-web-token-php"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"adhocore/jwt If you are new to JWT or want to refresh your familiarity with it, please check jwt.io - Lightweight JSON Web Token (JWT) library for PHP7, PHP8 and beyond. - Zero dependency (no vendor bloat). - If you still use PHP5.6, use version 0.1.2 Installation Features - Six algorithms supported: - kid support. - Leeway support 0-120 seconds. - Timestamp spoofing for tests. - Passphrase support for RS algos. Usage Only the key is required. Defaults will be used for the rest: For RS algo, the key should be either a resource like below: OR, a string with full path to the RSA private key like below: Pro You dont need to specify pub key path, that is deduced from priv key. Generate JWT token from payload array: Retrieve the payload array: Oneliner: Pro Can pass extra headers into encode() with second parameter: Test mocking Spoof time() for testing token expiry: Call again without parameter to stop spoofing time(): Examples with kid Stabillity The library is now marked at version 1. . as being stable in functionality and API. Integration Phalcon Check adhocore/phalcon-ext. Consideration Be aware of some security related considerations as outlined here which can be valid for any JWT implementations.","default_branch":null,"files":null,"tree":[],"storefront":"/r/adhocore","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/adhocore/php-jwt/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}