Customizing / i18n for DefaultConsentPage
I would like to have the consent page displayed in a language other than english.
Expected Behavior
A) the text used in DefaultConsentPage uses i18n to pull translations based on locale.
B) the HTML created by DefaultConsentPage can be replaced by custom code.
Current Behavior The implementation is static and changing this piece of the frontend requires replacing the whole Filters containing those calls, and modifying the filter chain yourself OR tricking around the current token logic.
Context
The name DefaultConsentPage implies it to be replaceable, but currently to me it seems like one had to hook into way up higher the filter chain.
Meanwhile quick improvements would be either to pull in the texts from message.properties OR making DefaultConsentPage a Bean directly injected into the filters instead of a singleton. This would be a good piece to make customizable according to the SRP.
Meanwhile the normal i18n solution would make the OOTB experience better.
Or did I maybe miss a simple way to customize the logic? What are your thoughts?
@n3phtys The DefaultConsentPage is meant for internal use only as indicated in the javadoc.
Furthermore, it's only meant to be used during development / testing. There are no plans on further enhancing the default consent page.
It is expected that production applications will provide their own consent page.
Take a look at the Demo Sample as it shows how to configure a custom consent page.