Authenticating 3rd party application which uses a redirect from their login to Mendix page

I am trying to make an integration between Mendix and a 3rd party Saas solution. That solution, naturally, provides web services. First step is to use a generated API key to get a ticket via a web service. This works fine. Then the ticket should be used to go to a login page (something like https://<3rd party tool>.com/api/auth/<ticket>. User should login there once. A token is returned and the idea is that a redirection takes place to a Mendix page from which point on the token can be stored and used for further communication with the 3rd party solution. How can this kind of authentication process be done with Mendix?
1 answers

Do the login by using a java url connection, submit the necessary data, and store the returned token. Pass the token to your webservice invocation.