anhpha / lexik-jwt-service-provider
There is no license information available for the latest version (1.0) of this package.
This is a provider for silex 2.0 using lexik jwt authentication provider class to create a encoder
1.0
2016-10-26 10:03 UTC
Requires
- namshi/jose: 7.2.2
- silex/silex: ~2.0
This package is not auto-updated.
Last update: 2025-01-27 15:07:45 UTC
README
JWT encoder provider for Silex 2.0 based on LexikJWTAuthenticationBundle
Usage
$ttl = 86400; $exp = time() + $ttl; $token = $this->container['lexikEncoder']()->encode(['username' => 'test', 'exp' => $exp]); $response = new JsonResponse(); $response->setData(array( 'token' => $token, )); //$response = new JsonResponse(); return $response;