Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: php7.0 minimum requirement #327

Merged
merged 1 commit into from
May 3, 2023
Merged

feat: php7.0 minimum requirement #327

merged 1 commit into from
May 3, 2023

Conversation

DeepDiver1975
Copy link
Collaborator

I feel like it is time to move on .... at least a bit.

This should go into a new major version 1.x.x to ensure anybody still being on 0.9.x with php5.x will not run into trouble

List of common tasks a pull request require complete

  • Changelog entry is added or the pull request don't alter library's functionality

@@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can add 8.2 also.

Suggested change
php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']

*/
private function getKeyForHeader($keys, $header) {
private function getKeyForHeader(stdClass $keys, stdClass $header) {
Copy link
Contributor

@ricklambrechts ricklambrechts May 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private function getKeyForHeader(stdClass $keys, stdClass $header) {
private function getKeyForHeader(array $keys, stdClass $header): stdClass
{

if (!class_exists('\phpseclib3\Crypt\RSA') && !class_exists('\phpseclib\Crypt\RSA') && !class_exists('Crypt_RSA')) {
throw new OpenIDConnectClientException('Crypt_RSA support unavailable.');
}
private function verifyRSAJWTSignature(string $hashType, $key, $payload, $signature, $signatureType): bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private function verifyRSAJWTSignature(string $hashType, $key, $payload, $signature, $signatureType): bool
private function verifyRSAJWTSignature(string $hashType, stdClass $key, string $payload, string $signature, string $signatureType): bool

$rsa->loadKey($public_key_xml, Crypt_RSA::PUBLIC_FORMAT_XML);
$rsa->setSignatureMode($signatureType === 'PSS' ? Crypt_RSA::SIGNATURE_PSS : Crypt_RSA::SIGNATURE_PKCS1);
return $rsa->verify($payload, $signature);
$key = PublicKeyLoader::load($key)

This comment was marked as resolved.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice update to use RSA::load!

Copy link
Collaborator

@azmeuk azmeuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I won't have time to do extensive testing soon, but just by reading the PR looks good to me.
I agree it is time to move on :) https://endoflife.date/php

@DeepDiver1975 DeepDiver1975 merged commit e6eab93 into master May 3, 2023
16 checks passed
@DeepDiver1975 DeepDiver1975 deleted the feat/php7 branch May 3, 2023 13:42
Magentron added a commit to Magentron/OpenID-Connect-PHP that referenced this pull request May 22, 2024
* upstream/master:
  fix: Removed duplicate check on jwks_uri and only check if jwks_uri exists when needed (jumbojett#373)
  fix: Check if subject is equal to subject of id token when verifying JWT claims (jumbojett#406)
  fix: Cast SERVER_PORT to integer (jumbojett#404)
  chore(deps): bump actions/cache from 3 to 4 (jumbojett#417)
  chore(deps): bump actions/checkout from 2 to 4 (jumbojett#416)
  docs: Update README.md to correct addScope parameter type in 1.0.0 (jumbojett#405)
  chore: Update ci to support php 8.3 and add dependabot (jumbojett#407)
  release: 1.0.0 (jumbojett#402)
  Set the User-Agent regardless of GET or POST (jumbojett#382)
  fix: Update well known config value function response types (jumbojett#376)
  feat: set useragent (jumbojett#370)
  feat: php7.0 minimum requirement (jumbojett#327)

# Conflicts:
#	CHANGELOG.md
Magentron added a commit to Magentron/OpenID-Connect-PHP that referenced this pull request May 22, 2024
…est-token

* master:
  fix: Removed duplicate check on jwks_uri and only check if jwks_uri exists when needed (jumbojett#373)
  fix: Check if subject is equal to subject of id token when verifying JWT claims (jumbojett#406)
  fix: Cast SERVER_PORT to integer (jumbojett#404)
  chore(deps): bump actions/cache from 3 to 4 (jumbojett#417)
  chore(deps): bump actions/checkout from 2 to 4 (jumbojett#416)
  docs: Update README.md to correct addScope parameter type in 1.0.0 (jumbojett#405)
  chore: Update ci to support php 8.3 and add dependabot (jumbojett#407)
  release: 1.0.0 (jumbojett#402)
  Set the User-Agent regardless of GET or POST (jumbojett#382)
  fix: Update well known config value function response types (jumbojett#376)
  feat: set useragent (jumbojett#370)
  feat: php7.0 minimum requirement (jumbojett#327)
  updated composer.json added replace, updated README.md added notification about project forked from

# Conflicts:
#	CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants