edamov / pushok

PHP client for Apple Push Notification Service (APNs) - Send push notifications to iOS using the new APNs HTTP/2 protocol with token-based (JWT with p8 private key)
MIT License
369 stars 119 forks source link

Ability to use private key content instead of file path #62

Closed xgin closed 5 years ago

xgin commented 5 years ago

Hi @edamov, First of all, thank you for the library!

I suggest adding the ability to use a private key as a string instead of a file. In my case, I don't want to ship it in a separate file but hardcode in the PHP script. I think it could be also helpful in other cases, e.g. when secrets are stored in a remote registry or environment. Backward compatibility is preserved.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.7%) to 65.902% when pulling b36ff90540a6e80c4ea3c89cde0aa51ee777b7f9 on xgin:token-private-key-content into 1e86c31dfb454b49b3a09ac20113d19354adc385 on edamov:master.

edamov commented 5 years ago

@xgin Thank you for the useful feature!