Auto Login

206 views
Skip to first unread message

gabrie...@gmail.com

unread,
Mar 8, 2016, 2:14:37 PM3/8/16
to camunda BPM users
Hi guys, I'm new using camunda. I wanna know if I can setup some config file to not show the login form and start the app logged.

Regards.

Sebastian Stamm

unread,
Mar 9, 2016, 3:41:36 AM3/9/16
to camunda BPM users, gabrie...@gmail.com
Hi,

you always need an user to use the web applications. However, in the tasklist, there is a config file where you can add custom scripts [1], so you could write a script that automatically fills the login form with a static username and password and logs this user in.

Cheers
Sebastian

gabrie...@gmail.com

unread,
Mar 9, 2016, 10:41:12 AM3/9/16
to camunda BPM users, gabrie...@gmail.com
Hi Sebastian,

I want to make the login but avoid the user making the click login. Is that posible ?

I tried using the DOM but don't let me, it say's "Your session has expired : You need to sign in again.". If I manipulate the DOM in the console works, but not in a script in the index.html.

Sebastian Stamm

unread,
Mar 9, 2016, 11:17:27 AM3/9/16
to camunda BPM users, gabrie...@gmail.com
Hi,

what were you able to achieve? You should not need to manipulate the DOM, only set the values of the username and password fields and then programmatically click the login button. The Tasklist would then perform a request to /camunda/api/admin/auth/user/default/login/tasklist with the username and password as payload. Does this work for you?

Cheers
Sebastian

gabrie...@gmail.com

unread,
Mar 9, 2016, 11:32:09 AM3/9/16
to camunda BPM users, gabrie...@gmail.com
Hi Sebastian,

I programmatically fill teh username and password. This is the code (using a demo user):
<script type="text/javascript">
$('#signinFormInputUsername').val('demo');
$('#signinFormInputPassword').val('demo');
angular.element('button.btn-lg').trigger('click');
</script>

Also tried with document ready to be secure of all is loaded and also with a timeout.

Regards.

gabrie...@gmail.com

unread,
Mar 9, 2016, 3:31:32 PM3/9/16
to camunda BPM users, gabrie...@gmail.com
Hi Sebastian, I fixed making the login with an ajax and works.

Regards.

Reply all
Reply to author
Forward
0 new messages