-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make lib more performant by allowing to provide local key objects and shared secrets #222
Conversation
# Conflicts: # src/WebPush.php
# Conflicts: # src/Encryption.php # src/Subscription.php # src/WebPush.php
Shared local key and secret
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks cool!
Can you rebase and fix the static errors please ?
Fixed the static errors, is it possible for you to rebase and merge pull request? |
Pinging @Minishlink Can we move forward with this? I'm unable to rebase the current merge request |
@marcvdm Thanks Marc, I'll work on it probably this week-end |
Closing this merge request for the rebased version #227 |
This pull request adds the ability to generate the local keys before hand and provide them to the WebPush client. This way it does not generate a new local key object for each notification.
This also opens the possibility to generate the shared secret before hand so that this is also skipped when you send the notification.
Here is an example:
Generate the local public and private key and store them
When a user subscribes we generate the shared secret and store it with all the other info
When you want to send a notification