TTMSFNCWebPushVapid Class
Stores and manages the VAPID (Voluntary Application Server Identification) key pair used to authenticate the application server to a push service. Provides loading, generation, and persistence of the public and private keys.
API unit family: TMS.TMSFNCWebPushCommon
Inherits from: TPersistent
Syntax
TTMSFNCWebPushVapid = class(TPersistent)
Remarks
Both keys are expected to be base64url encoded. The public key decodes to a 65-byte value and the private key to a 32-byte value; assigning a value that does not match raises an exception.
Properties
| Name | Description |
|---|---|
| PrivateKey | Base64url encoded private key used to sign authentication tokens for the push service. Keep this value secret. |
| PublicKey | Base64url encoded public key presented to the push service and shared with subscribing clients. |
Methods
| Name | Description |
|---|---|
| InitializeKeys | Ensures a usable key pair is available. When the keys are empty it loads them from the default configuration file, or generates a new pair and stores it when no file exists. |