TsgcWebPush_ClientProperties › VAPID

VAPID Property

VAPID (Voluntary Application Server Identification, RFC 8292) keys and subject used to sign each push request.

Syntax

property VAPID: TsgcHTTP_API_WebPush_VAPID_Options read FVAPID write SetVAPID;

Default Value

Remarks

Exposes three sub-sections needed to authenticate the application server against a browser push service: PEM (PrivateKey in PKCS#8 PEM format, used to sign the JWT attached to each request); DER (PrivateKey and PublicKey as Base64URL-encoded raw EC P-256 bytes — PublicKey is sent in the Crypto-Key header and the private one is used to derive the shared secret that encrypts the payload); and Details (MailTo address that becomes the sub claim, mailto: prefix added automatically). All three must be populated before calling SendNotification; missing values raise a validation exception.

Example

sgcWebPush_Client1.VAPID.PEM.PrivateKey.Text := '-----BEGIN PRIVATE KEY-----...';
sgcWebPush_Client1.VAPID.DER.PrivateKey := 'BASE64URL_PRIVATE_KEY';
sgcWebPush_Client1.VAPID.DER.PublicKey := 'BASE64URL_PUBLIC_KEY';
sgcWebPush_Client1.VAPID.Details.MailTo := 'info@esegece.com';

Back to Properties