The library can be installed using the package spomky-labs/web-push-lib
In addition to this package, you must install the required dependencies that are namely:
In the following example, we will install nyholm/prs7 and symfony/http-client.
composer require nyholm/psr7 symfony/http-client spomky-labs/web-push-lib

VAPID Header

The VAPID header authenticates your server and prevent malicious application to send notifications to your users. The header contains a signed JSON Web Token (JWS).
The library provides bridges for the following libraries web-token and lcobucci/jwt.
Please install web-token/jwt-signature-algorithm-ecdsa or lcobucci/jwt depending on the library you want to use.
It is possible to use any other JWS provider. This will be detailed in the future.
Export as PDF
Copy link
VAPID Header