From 3c3de277cdde90b258beed175c3df63172aa5739 Mon Sep 17 00:00:00 2001 From: Rick Lambrechts Date: Fri, 20 Jun 2025 17:41:25 +0200 Subject: [PATCH] Add recommendation to enable the GMP or BCMath PHP extension --- README.md | 5 +++++ composer.json | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 6d1cea9..240535e 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ Before using the OpenID Connect package for Laravel, ensure that your developmen - PHP 8.1 or higher: The package requires at least PHP version 8.1. Make sure you have PHP installed and configured properly on your system. - Laravel: The package is designed to work with Laravel, so you should have a Laravel application set up and running. - Composer: Composer is a dependency manager for PHP. You will need Composer installed to install and manage the package and its dependencies. +- **Recommended:** For optimal cryptographic performance (especially for RSA operations), it is highly recommended to enable the [GMP](https://www.php.net/manual/en/book.gmp.php) or [BCMath](https://www.php.net/manual/en/book.bc.php) PHP extensions. These extensions significantly improve the speed of cryptographic operations used by the underlying JWT library. If your environment meets these requirements, you can proceed with the installation and configuration of the OpenID Connect package. @@ -75,6 +76,10 @@ Make sure to implement the `LoginResponseHandlerInterface` in your custom respon ### Disable TLS Certificate Verification By default, the package verifies the TLS certificate when making requests to the issuer. If you want to disable TLS certificate verification, you can set the `OIDC_TLS_VERIFY` variable to false in your environment configuration. +### Having Issues? + +If you are experiencing timeout issues, please check that the [GMP](https://www.php.net/manual/en/book.gmp.php) or [BCMath](https://www.php.net/manual/en/book.bc.php) PHP extension is installed and enabled. These extensions are recommended for optimal performance, especially for RSA operations, and can significantly speed up cryptographic operations used by the underlying JWT library. + ## Contributing If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the GitHub repository of this package. diff --git a/composer.json b/composer.json index b8e0632..82f14c2 100644 --- a/composer.json +++ b/composer.json @@ -45,6 +45,10 @@ "slevomat/coding-standard": "^8.14", "ext-openssl": "*" }, + "suggest": { + "ext-gmp": "Enabling GMP is highly recommended for faster cryptographic operations (especially RSA).", + "ext-bcmath": "Enabling BCMath is highly recommended for faster cryptographic operations (especially RSA) as an alternative to GMP." + }, "scripts": { "test": [ "vendor/bin/phpunit",