-
Notifications
You must be signed in to change notification settings - Fork 45
Support for Web Push Payload Encryption #22
Comments
Yes, it should be pretty easy to encrypt the payload before it is sent based on some optional parameters. If you'd like to take a stab at implementing it, I'd be happy to review and provide some feedback for a pull request. |
Hello @lkorth, we have implemented some properties on the Message class (publicKey, salt, rawData) with getters and setters. We have then modified the Sender to intercept those properties (only if set) and add appropriate headers:
and body field for the notification request (as explained here):
This way your library can be used to send encrypted messages without having to encrypt them: is up to the user to give a correct rawData content. Here an example:
If you are interested we'll make a pull request. At the moment we have implemented it above your latest stable release but it's not hard to port it to the developer one. |
If you'd like to make a PR with those changes, that would be awesome! If you're already encrypting the data, would you consider adding a method to the A few things have moved around in the Let me know if I can clarify anything, otherwise I look forward to reviewing the PR. |
We will create the PR as soon as possible. Unfortunately the encryption stuff is really complex and we are using code from an external library (WebPush) that depends from many other libraries. So we have decided to decouple the payload handling stuff from the encryption tasks to ease the PR. Please take a look at their code, maybe you can use it to implement the same stuff in your library in future. |
Hello, as you know Google Chrome Push Notifications use GCM. But there is a downside:
In those months Google has implemented a solution that will be available in the new version Chrome 50 at the end of April 2016.
Do you think this kind of encrypted payload can be implemented into your library?
The text was updated successfully, but these errors were encountered: