Skip to content
Snippets Groups Projects
Commit eb79080f authored by Zandor Smith's avatar Zandor Smith :computer:
Browse files

Go back to the original firebase/php-jwt library for generating a JWT token.

parent 4b06aeae
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/zandor300/php-jwt-apns" />
<excludeFolder url="file://$MODULE_DIR$/vendor/firebase/php-jwt" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
......
......@@ -3,8 +3,13 @@
<component name="PhpIncludePathManager">
<include_path>
<path value="$PROJECT_DIR$/vendor/composer" />
<path value="$PROJECT_DIR$/vendor/zandor300/php-jwt-apns" />
<path value="$PROJECT_DIR$/vendor/firebase/php-jwt" />
</include_path>
</component>
<component name="PhpProjectSharedConfiguration" php_language_level="7.3" />
<component name="PhpUnit">
<phpunit_settings>
<PhpUnitSettings load_method="CUSTOM_LOADER" custom_loader_path="$PROJECT_DIR$/vendor/autoload.php" />
</phpunit_settings>
</component>
</project>
\ No newline at end of file
......@@ -18,13 +18,7 @@ composer require zandor300/apnsframework
## Dependencies
This framework depends on a fork of the [firebase/php-jwt](https://github.com/firebase/php-jwt) package. I've modified it to allow me to specify a different algorithm in the token from what is actually used. firebase/php-jwt doesn't support **ES256** as an algorithm (required by APNS) but APNS does accept a token made using **RS256** as long as the `alg` header item is set to **ES256**.
The fork is still usable as firebase/php-jwt like nothing has been changed. The only thing I changed is how the `$head` variable of the `encrypt(..)` function is being merged with the header the library creates. This way we can change `alg`.
You can view the fork on GitHub: [zandor300/php-jwt-apns](https://github.com/Zandor300/php-jwt-apns)
**Note:** If you use firebase/php-jwt in your project, make sure to replace that with zandor300/php-jwt-apns!
This framework depends on the [firebase/php-jwt](https://github.com/firebase/php-jwt) package.
## Usage
......
......@@ -9,7 +9,7 @@
"php": ">=7.1.0",
"ext-json": "*",
"ext-curl": "*",
"zandor300/php-jwt-apns": "^5.0"
"firebase/php-jwt": "dev-master"
},
"autoload": {
"psr-4": {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment