Skip to content

Accept auth key data directly.#18

Open
LorenDavie wants to merge 1 commit into
kukosk:masterfrom
LorenDavie:master
Open

Accept auth key data directly.#18
LorenDavie wants to merge 1 commit into
kukosk:masterfrom
LorenDavie:master

Conversation

@LorenDavie
Copy link
Copy Markdown

For use in environment where private key files can’t be on the filesystem. For 12-factor style deployments (such as Heroku) it is discouraged to put secrets like private keys on the filesystem. Instead it is recommended to put them into config variables (for Python, accessible via os.environ).

This change makes the APNSClient able to be instantiated with the auth key data specified directly, instead of exclusively via a filepath. Therefore one could do this:

auth_key = os.environ["APNS_AUTH_KEY"]
client = APNSClient(..., auth_key=auth_key)

For use in environment where private key files can’t be on the filesystem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant