[X] I have verified in the issues that my problem hasn't already been resolved
Setup
Please provide the following details, the more info you can provide the
better.
Operating System:
PHP Version: <7.1.11>
web-push-php Version: <2.0>
Please check that you have installed and enabled these PHP extensions :
[X] gmp
[X] mbstring
[X] curl
[X] openssl
Please select any browsers that you are experiencing problems with:
[ ] Chrome
[ ] Firefox
[ ] Firefox for Mobile
[ ] Opera for Android
[ ] Samsung Internet Browser
[ ] Other - MS Edge
Please specify the versions (i.e. Chrome Beta, Firefox Beta etc).
MS Edge 17
Problem
Microsoft Edge will support Webpush Notification soon. They already started to support Webpush in Insider (Beta) program and probably it will be live soon. It only supports sending with VAPID. So I get endpoint, publickey, token correctly but I couldn't send webpush yet.
My problem is when I send webpush it gives 401 Invalid Token error. But expired parameter is false in result. So expired parameter only works when status code in 404 and 410.
Is it possible to add 401 to expired status code ?
NOTE: Please test in a least two browsers (i.e. Chrome and Firefox). This helps with diagnosing problems quicker.
Setup
My problem is when I send webpush it gives 401 Invalid Token error. But expired parameter is false in result. So expired parameter only works when status code in 404 and 410.
Is it possible to add 401 to expired status code ?
Detailed description is here : https://blogs.windows.com/msedgedev/2017/12/19/service-workers-going-beyond-page/#bru6dYJBWR3CBEyB.97
It returns http 401 Invalid Token but expired parameter is not true in result
Expected
Expired parameter should be true when status code is 401
Example / Reproduce Case
Result is :
[success] => | [endpoint] => https://db5.notify.windows.com/w/?token=XXXXXX | [message] => Client error:
POST https://db5.notify.windows.com/w/?token=XXXXXX
resulted in a401 Unauthorized
response | [statusCode] => 401 | [expired] => | [content] => GuzzleHttp\Psr7\Stream Object | ( | [stream:GuzzleHttp\Psr7\Stream:private] => Resource id #6 | [size:GuzzleHttp\Psr7\Stream:private] => 0 | [seekable:GuzzleHttp\Psr7\Stream:private] => 1 | [readable:GuzzleHttp\Psr7\Stream:private] => 1 | [writable:GuzzleHttp\Psr7\Stream:private] => 1 | [uri:GuzzleHttp\Psr7\Stream:private] => php://temp | [customMetadata:GuzzleHttp\Psr7\Stream:private] => Array | ( | ) | | ) | | [headers] => Array | ( | [Content-Length] => Array | ( | [0] => 0 | ) | | [X-WNS-MSG-ID] => Array | ( | [0] => 690BE40828827493 | ) | | [X-WNS-DEBUG-TRACE] => Array | ( | [0] => DB5SCH101121621 | ) | | [Strict-Transport-Security] => Array | ( | [0] => max-age=31536000; includeSubDomains | ) | | [WWW-Authenticate] => Array | ( | [0] => bearer error="invalid_request",error_description="Invalid token" | ) | | [Date] => Array | ( | [0] => Fri, 22 Dec 2017 14:15:50 GMT | ) | | )Other
Thanks :)