Need help with the loginplugin. method not getting triggered. Github code link added

Hi here is the code of the plugin which I am trying https://github.com/sherry-ummen/NuxeoLoginPlugin

its basically taken from here https://www.nuxeo.com/blog/guest-post-integrating-single-sign-sso-nuxeo-case-management/

I did 'mvn clear package' and added the .jar file to C:\Nuxeo\nxserver\bundles

I know that initPlugin method is being called (because of my debug code), but handleRetrieveIdentity is not being called ?

I am trying to login via .Net client and I thought it would trigger the handleRetrieveIdentity but it does not, i tried to login from the portal that also does not trigger it. Now I am confused when it should be actually called then or why is it not being called ?

0 votes

2 answers

792 views

ANSWER



Full working code could be found here https://github.com/sherry-ummen/NuxeoLoginPlugin . A detailed blog post will follow soon.

0 votes



This file is not valid XML (it has two “component” document root elements):

https://github.com/sherry-ummen/NuxeoLoginPlugin/blob/master/src/main/resources/OSGI-INF/extensions/myproject-LoginPluginRegistry-contribution.xml

edit: I have not run your code, but I am guessing that initPlugin runs when the Java bundle is loaded (and hence will run) but since the authentication config file is not well-formed, no behavior is changed. Check your server startup log for WARNING or ERROR messages related to that XML file or your bundle in general.

0 votes



I have fixed that file by removing that component, but still it does not work. No warning related to that in the console. Also I have log prints in the code. How do I see them in the console ? And how can I test it ? by just login in from my nuxeo instance portal or any other way ?
07/28/2017

I actually got it working, it seems I have a some typo in my configuration file. Now the working code is here https://github.com/sherry-ummen/NuxeoLoginPlugin . Thanks Steven Huwig for your help. Edit: it works partially because my handleRetrieveIdentity return null , and my loginplugin is not being called yet, but may be that happens after this ?
07/28/2017

Ok now full chain works
07/28/2017