Last post Apr 21, 2016 03:26 PM by tfsjohan
Feb 05, 2016 08:07 AM|RichardMaher|LINK
With Firefox 44+ now supporting the Push API (and, more importantly, that Edge developers have also committed to supporting it) does someone have some example C# code that would be able to encrypt then push a payload-bearing message to my Firefox Web App?
is fixing a bug) call getKey() on your subscription object and send the result along with your subscription .endpoint to your server so that your server logic knows that you have subscribed. (E.g. https://github.com/chrisdavidmills/push-api-demo/blob/gh-pages/main.js#L19 )
Ok, that's all on the browser and not particularly relevant to the C# code. What I'mm looking for is C# that will take the public key DH 'p256dh' and use it to encrypt the response message (avec payload) that will be POSTed back to the browser.
the sendNotification() function, you will see the encryption and the pushRequest I'm looking for.
Is there a class(es) that handles this for us in .NET C#
Feb 08, 2016 08:08 AM|sudo10|LINK
does someone have some example C# code that would be able to encrypt then push a payload-bearing message to my Firefox Web App?
According to your description, i'm not sure what you mean, you'd like to send message to firefox server?
Feb 09, 2016 04:54 AM|RichardMaher|LINK
What I/we need is a new version of: -
That will take the public key returned from https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription/getKey and use that to encrypt the PUSH message payload and
Endpoint so that it can be sent back to the Service Worker on the FireFox browser client and appear in a toast notification.
NB: I am not interested in hearing of alternatives! The Push API is standard implemented by Chrome, FireFox and soon to be Edge. I have provided a link to a Node.js example that contains the logic required. What I'm after is the classes necessary to implement
a C# .NET Server solution.
If you can help then please do. If it is still unclear that please do a bit more reading before replying.
Cheers Richard Maher
Feb 09, 2016 05:45 AM|RichardMaher|LINK
BTW, please take a couple of minutes to vote for these features to hopefully speed things up: -
Apr 21, 2016 03:26 PM|tfsjohan|LINK
Did you ever find a solution? I am also looking for a C# library to deal with the encryption.