Home > borogove > Client > enablePush

Client.enablePush() method

Enable push notifications

Signature:

enablePush(push_service: string, endpoint: string, p256dh: ArrayBuffer, auth: ArrayBuffer, grace: number, vapid_private_pkcs8?: ArrayBuffer | null, claims?: string[] | null): void;

Parameters

Parameter Type Description
push_service string the address of a push proxy
endpoint string the final target for the push proxy to forward to
p256dh ArrayBuffer A P-256 uncompressed point in ANSI X9.62 format
auth ArrayBuffer Random 16 octed value
grace number Grace period during which not to generate push if another app is active for same account, in seconds (negative for none)
vapid_private_pkcs8 ArrayBuffer | null (Optional) the private key for signing JWT of the push service
claims string[] | null (Optional) Optional additional JWT claims as key then value

Returns:

void