Open
Conversation
…1gp1g-webpush_requests
Closed
Member
Author
|
@p1gp1g please see the last commit and lets talk |
* Parse WPDeviceToken during registration * Clarify PPInvalidPusher with apnsPushProviderClient * Use SrvLoc for webpush endpoints * Remove unused WPEndpoint * Test RFC8291 - webpush encryption - implementation * Fix tests with -fserver_postgres * Disable redirections with webpush * Rename webpush tests, and move behind server_postgres flag * Parse webpush endpoint with StrEncoding * Fix rename webpush tests * Lint import * Test push notification encoding for webpush * Test strDecoding invalid WPDeviceToken
e21323a to
98280e2
Compare
98280e2 to
e3f8937
Compare
epoberezkin
commented
Nov 12, 2025
| _ -> PPWPOtherError $ tshow e | ||
| where | ||
| fromStatusCode status reason | ||
| | status == N.status200 = PPWPRemovedEndpoint |
epoberezkin
commented
Nov 12, 2025
|
|
||
| -- | encrypt :: UA key -> AS key -> salt -> clear -> cipher | ||
| -- | https://www.rfc-editor.org/rfc/rfc8291#section-3.4 | ||
| wpEncrypt' :: WPKey -> ECC.PrivateNumber -> ByteString -> ByteString -> ExceptT C.CryptoError IO ByteString |
Member
Author
There was a problem hiding this comment.
add symmetric decrypt function and test
epoberezkin
commented
Nov 12, 2025
| ivFrom :: ByteString -> ExceptT C.CryptoError IO C.GCMIV | ||
| ivFrom s = liftEither $ C.gcmIV s | ||
|
|
||
| encodeWPN :: PushNotification -> BL.ByteString |
Member
Author
There was a problem hiding this comment.
add symmetric decodeWPN
epoberezkin
commented
Nov 12, 2025
| shift i w = Bits.shiftL (fromIntegral w) (64 * i) | ||
|
|
||
| data WPTokenParams = WPTokenParams | ||
| { wpPath :: ByteString, |
Member
Author
There was a problem hiding this comment.
replace with relative URI as discussed
epoberezkin
commented
Nov 12, 2025
| PPAPNS p -> APNSDeviceToken p . encodeUtf8 <$> (o .: "token") | ||
|
|
||
| -- | Returns fields for the device token (pushProvider, token) | ||
| -- TODO [webpush] save token as separate fields |
Member
Author
There was a problem hiding this comment.
different fields for different token subtypes, same for deviceTokenFields.
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.
see comments in #1613