eru123 / jwt
HS256/SHA256 JWT Implementation
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/eru123/jwt
README
Simple and Straightforward JWT Library
<?php require_once 'vendor/autoload.php'; use eru123\jwt\JWT; $payload = [ 'hello' => 'world', ]; $key = 'secret'; $token = JWT::encode($payload, $key); // eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJoZWxsbyI6IndvcmxkIn0.bqxXg9VwcbXKoiWtp-osd0WKPX307RjcN7EuXbdq-CE $decoded = JWT::decode($token, $key); // {"hello":"world"}