VapidConfig - viames/pair GitHub Wiki
Pair framework: VapidConfig
Pair\Push\VapidConfig reads Web Push VAPID settings from environment.
Required .env variables:
PUSH_VAPID_PUBLICPUSH_VAPID_PRIVATEPUSH_VAPID_SUBJECT
Methods
publicKey(): string
privateKey(): string
subject(): string
Each method throws RuntimeException if value is missing/empty.
Example
$config = new \Pair\Push\VapidConfig();
$public = $config->publicKey();
$private = $config->privateKey();
$subject = $config->subject();
Practical notes
subjectshould be a contact URL ormailto:value.- Keep private key secret and never expose it to frontend.
- Public key is the one used by browser subscription flows (
PairPush.subscribe).
See also: WebPushSender, PushDispatcher, Configuration-file.