JS only plugin in springboot webapp


#1

I’m trying to implement SSO using openid in a camunda springboot webapp. The login works fine, but for the logout I need to redirect user to the webpage on the sso server(there’s no way around that in our environment).
The logout action in the cockpit just performs an XMLHttpRequest to the endpoint api/admin/auth/user/default/logout and I cannot redirect user by simply sending redirect from the backend.
So my idea was to modify the logout action in the cockpit by adding a JS plugin(which is also discussed in another topic here: Custom Logout event). I’ve found some example how to do a simple JS-only plugin here: https://github.com/camunda/camunda-bpm-examples/tree/master/cockpit/js-only-plugin
I’ve followed the info, but since I don’t have a WAR, but a springboot application, I’m not sure where to put the files. When I place them under resources/app/cockpit/admin/scripts, it’s not picked up by the cocpkit application. What’s the best way to register simple JS plugin when using camunda-bpm-spring-boot-starter-webapp?

My camunda-bpm-spring-boot-starter-webapp version is 3.2.0


#2

I’ve figured it out. The path has to be
src/main/resources/META-INF/resources/webjars/camunda/app/admin/scripts/config.js