diff --git a/src/Bundle/JoseFramework/Serializer/JWESerializer.php b/src/Bundle/JoseFramework/Serializer/JWESerializer.php index b6e249fa1..ad98a923b 100644 --- a/src/Bundle/JoseFramework/Serializer/JWESerializer.php +++ b/src/Bundle/JoseFramework/Serializer/JWESerializer.php @@ -26,6 +26,13 @@ public function __construct( $this->serializerManager = $serializerManager; } + public function getSupportedTypes(?string $format): array + { + return [ + JWE::class => class_exists(JWESerializerManager::class) && $this->formatSupported($format), + ]; + } + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { return $type === JWE::class diff --git a/src/Bundle/JoseFramework/Serializer/JWSSerializer.php b/src/Bundle/JoseFramework/Serializer/JWSSerializer.php index aac2f6e63..ecaee239e 100644 --- a/src/Bundle/JoseFramework/Serializer/JWSSerializer.php +++ b/src/Bundle/JoseFramework/Serializer/JWSSerializer.php @@ -26,6 +26,13 @@ public function __construct( $this->serializerManager = $serializerManager; } + public function getSupportedTypes(?string $format): array + { + return [ + JWS::class => class_exists(JWSSerializerManager::class) && $this->formatSupported($format), + ]; + } + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { return $type === JWS::class