I’m having a try on JMIX (currently using Cuba): I was surprised to see that, by default, the admin menu is almost empty. Reading the forum, I saw how to add the Entity Inspector, but I still don’t know how to display and use the Scheduled Tasks and the User Sessions Log that I find so useful.
Thanks.
Is there an example of using Quartz with Jmix available ?
Just a Hello world example, to see the creation of the Job would be enough.
The documentation is very light on this particular context.
Look at the authentication events. You can register login/logout events of your users, for example by defining an entity with a browse screen and creating such entities in the authentication event listeners.
Thanks @krivopustov, this helps.
However, I have a last question: this doesn’t manage logout by time out, or logout by closing the browser window (as it was handled in CUBA). Is there a way to keep control on that and not keep ghost logins?
Have a nice day.
O.
I am trying the solution which you have provided. Most of the cases are working perfectly but sometimes i get the exception bellow:
java.lang.ClassCastException: class org.springframework.security.web.authentication.WebAuthenticationDetails cannot be cast to class io.jmix.core.security.ClientDetails (org.springframework.security.web.authentication.WebAuthenticationDetails and io.jmix.core.security.ClientDetails are in unnamed module of loader org.springframework.boot.loader.LaunchedURLClassLoader @e2144e4)
Hi Ilias,
Perhaps you can investigate the reason if if you check the real class of event.getAuthentication().getDetails() and log its content instead of getting sessionId.
Hello,
Thank you for your reply.
I found out that when a user is logging in with remember me enabled (Not the first time while he had checked remember me but after closing the browser and open it again), event.getAuthentication().getDetails() is instance of WebAuthenticationDetails and not ClientDetails.
I made it work by retrieving sessionID from request.