diff --git a/composer.json b/composer.json index 1c672ac..dd635c6 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ "psr/http-factory": "^1.0", "psr/log": "^1.0|^2.0|^3.0", "spomky-labs/cbor-php": "^3.0", - "symfony/uid": "^6.1", + "symfony/uid": "^6.1|^7.0", "web-auth/cose-lib": "^4.2.3", "web-auth/metadata-service": "self.version" }, @@ -47,13 +47,7 @@ }, "suggest": { "psr/log-implementation": "Recommended to receive logs from the library", - "web-token/jwt-key-mgmt": "Mandatory for the AndroidSafetyNet Attestation Statement support", - "web-token/jwt-signature-algorithm-rsa": "Mandatory for the AndroidSafetyNet Attestation Statement support", - "web-token/jwt-signature-algorithm-ecdsa": "Recommended for the AndroidSafetyNet Attestation Statement support", - "web-token/jwt-signature-algorithm-eddsa": "Recommended for the AndroidSafetyNet Attestation Statement support", + "web-token/jwt-library": "Mandatory for the AndroidSafetyNet Attestation Statement support", "symfony/event-dispatcher": "Recommended to use dispatched events" - }, - "require-dev": { - "symfony/event-dispatcher": "^6.1" } } diff --git a/src/AttestationStatement/AndroidSafetyNetAttestationStatementSupport.php b/src/AttestationStatement/AndroidSafetyNetAttestationStatementSupport.php index 52f7a87..cf508c4 100644 --- a/src/AttestationStatement/AndroidSafetyNetAttestationStatementSupport.php +++ b/src/AttestationStatement/AndroidSafetyNetAttestationStatementSupport.php @@ -71,14 +71,9 @@ public function __construct( 'The parameter "$clock" will be required in 5.0.0. Please set a clock instance.' ); } - if (! class_exists(RS256::class)) { + if (! class_exists(RS256::class) || ! class_exists(JWKFactory::class)) { throw UnsupportedFeatureException::create( - 'The algorithm RS256 is missing. Did you forget to install the package web-token/jwt-signature-algorithm-rsa?' - ); - } - if (! class_exists(JWKFactory::class)) { - throw UnsupportedFeatureException::create( - 'The class Jose\Component\KeyManagement\JWKFactory is missing. Did you forget to install the package web-token/jwt-key-mgmt?' + 'The algorithm RS256 is missing. Did you forget to install the package web-token/jwt-library?' ); } $this->jwsSerializer = new CompactSerializer();