Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 22, 2024 via composer

firebase/php-jwt v6.10.0

A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.
Package summary
Share
0
issues
1
license
1
BSD-3-Clause
Package created
30 Aug 2013
Version published
1 Dec 2023
Maintainers
3
Total deps
1
Direct deps
0
License
BSD-3-Clause

Issues

0
This package has no issues

Licenses

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
firebase/php-jwt@v6.10.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of firebase/php-jwt 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does firebase/php-jwt do?

The Firebase/PHP-JWT is a simple library designed to encode and decode JSON Web Tokens (JWT) in PHP, conforming to the RFC 7519 specification. It serves the role of ensuring secure transmission of information between parties as JSON objects. This information is digitally signed, confirming the authenticity and reliability of the sent information.

How do you use firebase/php-jwt?

To use Firebase/PHP-JWT in your PHP project, first install it via Composer by using the command:

composer require firebase/php-jwt

Once installed, it gets employed in your PHP code. Below is a basic usage example for encoding and decoding a payload:

use Firebase\JWT\JWT;
use Firebase\JWT\Key;

$key = 'example_key';
$payload = [
    'iss' => 'http://example.org',
    'aud' => 'http://example.com',
    'iat' => 1356999524,
    'nbf' => 1357000000
];

$jwt = JWT::encode($payload, $key, 'HS256');
$decoded = JWT::decode($jwt, new Key($key, 'HS256'));
print_r($decoded);

Apart from basic usage, it supports multiple advanced functionalities such as using RSA encryption (RS256), generating JWT with a passphrase, using EdDSA (libsodium and Ed25519 signature), multiple keys, JSON Web Key Sets (JWKs), and cached key sets among others.

Where are the firebase/php-jwt docs?

Firebase/PHP-JWT documentation doesn't have a dedicated website. Instead, one can find all needed instructions and usage examples directly on the project's GitHub repository. The readme file of this repository contains detailed instructions on how to install and use Firebase/PHP-JWT, including various usage examples for different scenarios.