PHPackages                             webdevcave/jwt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. webdevcave/jwt

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

webdevcave/jwt
==============

Lib for generating Json Web Tokens using PHP

v1.1.1(1y ago)0111MITPHPPHP &gt;=8.1

Since Jul 16Pushed 1y agoCompare

[ Source](https://github.com/WebdevCave/jwt-php)[ Packagist](https://packagist.org/packages/webdevcave/jwt)[ RSS](/packages/webdevcave-jwt/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (4)Used By (0)

JWT
===

[](#jwt)

[![codecov](https://camo.githubusercontent.com/ed7181549b424bf0e014ab953888560b88746981d433884d21c0b183c17ef626/68747470733a2f2f636f6465636f762e696f2f67682f576562646576436176652f6a77742d7068702f67726170682f62616467652e7376673f746f6b656e3d55304f58665772444a6c)](https://codecov.io/gh/WebdevCave/jwt-php)[![Latest Stable Version](https://camo.githubusercontent.com/57ebaa0a76d0917b11984ab3d327dc400fc1616406f2fad5e740d7d769b55cca/68747470733a2f2f706f7365722e707567782e6f72672f776562646576636176652f6a77742f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/webdevcave/jwt)[![Latest Unstable Version](https://camo.githubusercontent.com/94d0bb6b25ccd8a851a715a8e4c1a70a6fd041b0fb269fa323d6fee1213add0d/68747470733a2f2f706f7365722e707567782e6f72672f776562646576636176652f6a77742f762f756e737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/webdevcave/jwt)[![Total Downloads](https://camo.githubusercontent.com/e29604284d1ce6b5961faf852d55895231592eb8b52cac02eb1d2f976ce69199/68747470733a2f2f706f7365722e707567782e6f72672f776562646576636176652f6a77742f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/webdevcave/jwt)[![License](https://camo.githubusercontent.com/dae4ae68905092ce71bbc1e0d9216b2859eed79a5dfdaa270a793db0df95d9bc/68747470733a2f2f706f7365722e707567782e6f72672f776562646576636176652f6a77742f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/webdevcave/jwt)[![StyleCI](https://camo.githubusercontent.com/25c41c6c7827dbba738e58be190e7293cedbe6e23fff9f24340389d77bd82364/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3832373332363736342f736869656c643f6272616e63683d6d61696e)](https://github.styleci.io/repos/827326764?branch=main)

[![](https://camo.githubusercontent.com/501586654ee22168e4c0978120ce734329615f92fbb4d44f93ccf5364392dfa3/68747470733a2f2f6a77742e696f2f696d672f6c6f676f2d61737365742e737667)](https://jwt.io/)

How to install
--------------

[](#how-to-install)

```
composer require webdevcave/jwt

```

Provided signers
----------------

[](#provided-signers)

  Algorithm Version   HS256 1.0   HS384 1.0   HS512 1.0   RS256 1.1   RS384 1.1   RS512 1.1 Provided claim validators
-------------------------

[](#provided-claim-validators)

  Claim Version Description RFC   aud 1.1 Audience    exp 1.0 Expiration time (timestamp)    iss 1.1 Issuer    nbf 1.0 Not before (timestamp)    sub 1.1 Subject  - "typ" claim is defined as JWT by default.
- "iat" and "nbf" claims are starts with the current timestamp by default.
- "jti" validator isn't provided but it can be implemented by your application as presented in "Validating your private claims" section

Basic Usage
-----------

[](#basic-usage)

### Generating a token

[](#generating-a-token)

```
