Overriding default templates using plugin provided templates

Bachl, Mathias mathias.bachl at brz.gv.at
Fri Mar 31 12:26:52 UTC 2023


Hi,

I would like to develop an IdP plugin that provides customized velocity templates to override the default templates, e.g. customized versions of error.vm or saml2-post-binding.vm.

So far I discovered 2 ways that should/might work in my understanding:


  1.  set the property idp.views to classpath:/<path> where <path> is the path inside the plugin jar
     *   I successfully managed to use idp.views to override e.g. saml2-post-binding.vm using a file-system resource, but unfortunately it didn't work with a classpath resource. I could't figure out why so far, because the instance of VelocityConfigurer that is defined in mvc-beans.xml even defines some classpath resources by default: classpath:/net/shibboleth/idp/views,classpath:/META-INF/net/shibboleth/idp/views (I also tried placing my .vm files in these directories inside the plugin - no success...)
  2.  provide the customized template in /templates/saml2-post-binding.vm inside the plugin jar
     *   I discovered this approach in the OIDC OP plugin, but I suspect that this approach works for providing additional views only and not for overriding pre-existing ones?

Is approach 1) the right one? Am I missing something?

Best regards & thanks in advance,
Mathias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/dev/attachments/20230331/f7326af4/attachment.htm>


More information about the dev mailing list