I need to integrate my CUBA application with an external Java Web Application. The user’s authentication is performed by the external Application (by login/password), after that, if the web user presses a link button, he/she will be redirected to my Cuba Application with a request of login as explained below.
What I need is to replace the standard login page with a CUBA service able to (removing also from the CUBA’s Web GUI every “logout buttons”):
- receive an HTTP GET request for a login action (from the external App) with a token parameter in a query string as this:
- call back an external SOAP Service replying with the received token and with a logout URL (a function of the token as:
- parse the SOAP response:
(a) if it’s OK the service starts a user session (mantaining the token into the session itself), mapping some received infos (from SOAP response) with a user/password/role in my CUBA Application
(b) if it’s an KO response the service shows an error page (no authentication)
- in case of 3-(a), the service is able to receive the external logout request in the form of the provided logout URL (see 2) in order to logout the specific user session, in any case the session will go in timeout in case of inaction for XX minutes.
What’s the best way to implement this scenario?
At the moment I’m using the latest stable version of the Cuba Platform (the 6.7.2 version).