kudze / access-token-validator
Library for validating access tokens from auth.kudze.lt
v1.0.3
2024-03-19 03:38 UTC
Requires
- php: ^8.3
- firebase/php-jwt: ^6.10
Requires (Dev)
- nesbot/carbon: ^3.0
- phpunit/phpunit: ^11.0
README
Description
This is a very small utility to validate access tokens that are emitted from: https://auth.kudze.lt
How to use
- Configure enviroment variable
JWT_PUBLIC_KEY
to be public key from: https://auth.kudze.lt (We may introduce rotating keys in future) - Use
AccessTokenValidator
service to decode access token.
Unit tests
In order to run unit tests you need to:
- Install composer dependencies:
composer install
- Run phpunit tests:
./vendor/bin/phpunit