fpush-apns: add APNs token-based authentication (p8)#42
Open
infobug wants to merge 1 commit into
Open
Conversation
Add support for token-based APNs authentication as an alternative to certificate-based (p12) auth. Token-based auth uses a .p8 key file that never expires, eliminating the need for annual certificate renewal. Config now accepts either: - certFilePath + certPassword (existing p12 flow, unchanged) - keyPath + keyId + teamId (new p8 token flow) Both auth methods are fully supported and backward compatible. Existing p12 configs continue to work without modification.
5b2f29b to
2a119da
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.p8key file that never expires, eliminating annual certificate renewalConfiguration
Either auth method can be used by providing the appropriate fields:
Certificate-based (existing, unchanged):
Token-based (new):
Implementation
config.rs: MadecertFilePath/certPasswordoptional, addedkeyPath/keyId/teamIdfields, addedApnsAuthenum to express the two auth modespush.rs: Added a second init path usingClient::token()from the existinga2crate (which already supports token auth), with clear error messaging if neither auth method is configuredTest plan