sprocketbox / laravel-jwt

A seamless JWT implementation for Laravel
MIT License
69 stars 2 forks source link

Add database backed logging #8

Open ollieread opened 4 years ago

ollieread commented 4 years ago

Add the ability to enable JWT id logging in the database along with corresponding expiration timestamps.

The database should only store the jti, aud and exp claims. It should have a flag for revoking tokens and an optional command to clean any entries that have expired.

ludo237 commented 4 years ago

You can leverage a json column to store every claims

ollieread commented 4 years ago

@ludo237 I'd like to avoid storing every claim. The reason for the selected ones above are for several reasons:

The idea is not to backup the JWT in the database, as that's sort of pointless. It's to instead keep a log of JWTs being issued.