A JWSBuilderFactory
is available as a service in your application container:
With this factory, you will be able to create the JWSBuilder you need:
You can now use the JWSBuilder as explained in the JWS Creation section.
There is also another way to create a JWSBuilder object: using the bundle configuration.
With the previous configuration, the bundle will create a public JWS Builder service named jose.jws_builder.builder1
with selected signature algorithms.
You can add custom tags and attributes to the services you create.
To use the signed tokens (JWS), you have to install the web-token/jwt-signature
component.
When this component is installed, signature algorithms are automatically handles by the Algorithm Manager Factory.
You can use symfony/serializer
to serialize/unserialize your tokens:
A JWSVerifierFactory
is available as a service in your application container:
With this factory, you will be able to create the JWSVerifier you need:
You can now use the JWSVerifier as explained in the JWS Creation section.
Reminder: it is important to check the token headers. See the checker section of this documentation.
There is also another way to create a JWSVerifier object: using the bundle configuration.
With the previous configuration, the bundle will create a public JWS Verifier service named jose.jws_verifier.verifier1
with selected signature algorithms.
You can add custom tags and attributes to the services you create.
The JWSLoaderFactory
is available as a public service. You can retrieve it using the container or inject it into your services. It will help you to create JWSLoader
objects on demand.
You can also create JWSLoader
objects as services using the configuration of the bundle.
Or using the ConfigurationHelper
.
A JWSSerializerManagerFactory
is available as a service in your application container:
With this factory, you will be able to create the JWSSerializerManager you need:
You can now use the JWSSerializerManager as explained in the JWS Creation/Loading section.
Available JWS serialization modes are:
jws_compact
jws_json_general
jws_json_flattened
There is also another way to create a JWSSerializerManager object: using the bundle configuration.
With the previous configuration, the bundle will create a public JWS Serializer Manager service named jose.jws_serializer.serializer1
with selected serialization modes.
You can add custom tags and attributes to the services you create.