Skip to content
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

Add option to pass Auth Key as base64 string #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dunkmann00
Copy link

Pass the base64 encoded Auth Key string to TokenCredentials rather than the file path. This can be useful when the Auth Key is not stored in a file for security reasons.

This also adds a test to ensure that passing in a base64 encoded string is equivalent to passing it in as a file.

I found this option necessary when I wanted to use PyAPNs2 on Heroku. I didn't want to check in the .p8 Auth Key file because the repo I use is also public on Github. A solution would be to encode the file as base64 and then store it as an environment variable in Heroku. This would provide access to the Auth Key while not needing to include it in the repo.

Pass the base64 encoded Auth Key string to TokenCredentials rather than
the file path. This can be useful when the Auth Key is not stored in a
file for security reasons.
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.

2 participants