JWE serializers¶
JWE serializer manager factory service¶
A JWESerializerManagerFactory is available as a service in your application container:
<?php
use Jose\Component\Encryption\JWESerializerManagerFactory;
$jweSerializerManagerFactory = $container->get(JWESerializerManagerFactory::class);
With this factory, you will be able to create the JWESerializerManager you need:
You can now use the JWESerializerManager as explained in the JWE Creation/Loading section.
Available JWE serialization modes are:
jwe_compactjwe_json_generaljwe_json_flattened
JWE serializer manager as service¶
There is also another way to create a JWESerializerManager object: using the bundle configuration.
With the previous configuration, the bundle will create a public JWE Serializer Manager service named jose.jwe_serializer.serializer1 with selected serialization modes.
Custom tags¶
You can add custom tags and attributes to the services you create.