Login to bonita Portal with certain user

1
0
-1

I have an application that communicates with Bonita through the REST API. Whenever I try to start a case from a given process I use forms in order to do that. My question is, I login in my app with a certain user (say helen.kelly) but when I open the form from the app, the user that is going to fill the form is the user logged in in the bonita portal which may not necessarily be the user logged in my app. I want to know if there is a way to open the form and automatically log in with a given user. I know there is an autologin feature but, from my understanding, it logs in with an anonymous user and I want to login with a specific user.
P.S obviously i'm also trying to bypass the login screen if there is no user logged in bonita portal ;)

thanks in advance

1 answer

1
0
-1

Yup
http://HOST_NAME_HERE:PORT_NUMBER_HERE/bonita/loginservice?username=USER_NAME_HERE&password=PASSWORD_HERE&redirectUrl=portal%2Fhomepage

You can redirect to locations other than /portal/homepage by changing the redirectUrl to taste.
If required, the username, password and redirect url should all be encoded properly.

Chris

Comments

Submitted by tcarmo20 on Mon, 10/24/2016 - 15:33

Maybe I haven't made myself very clear. I login just fine with my app and store the cookie which I use in subsequent requests to the REST API. The thing is, if, for instance, walter.bates is logged in the bonita portal and I login with helen.kelly in my app, when I try to start a case from within my app (not a web app), the person who is going to fill the form is the one logged in the portal and not the app.. I open the form with this URL: "http://localhost:8080/bonita/portal/resource/process/PROCESS_NAME/PROCES..."

Is there a way to send the user credentials to the portal from this URL? so that user logs in when the URL is opened?

Submitted by contact_420 on Mon, 10/24/2016 - 19:06

By "my app" you mean application configured inside bonita or your own, separated webapp? If it is the one inside bonita than everything should work fine out of the box. If it is outside bonita, you need to introduce sso - not easy topic...

Best regards,
bpms.help

Submitted by tcarmo20 on Tue, 10/25/2016 - 10:55

It is a separate app..thanks mate! could you point me in the direction where I can find more about sso?

Submitted by contact_420 on Tue, 10/25/2016 - 12:08

First thing that you have to know - it is not available out of the box in Community version ( documentation). But it doesn't mean it is not possible to do that. It just mean a lot of Java code... Some examples you can find on stackoverflow portal.

Best regards,
bpms.help

Notifications