Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Builder
✓ use Lcobucci\JWT\Builder;
Create a signed JWT token
use Lcobucci\JWT\Builder;
use Lcobucci\JWT\Signer\Hmac\Sha256;
$token = (new Builder())
->issuedBy('http://example.com')
->permittedFor('http://example.org')
->identifiedBy('4f1g23a12aa', true)
->issuedAt(new DateTimeImmutable())
->canOnlyBeUsedAfter(new DateTimeImmutable())
->expiresAt((new DateTimeImmutable())->modify('+1 hour'))
->withClaim('uid', 1)
->getToken(new Sha256(), new Signer\Key('testing'));
Audit
Dependencies
No dependency data recorded yet.