REST API Bonita 7.2 Authentication Unable to log in (Web browser)

1
0
-1

Hello,

i am trying to do an authentication test from Web by Postman Extension.

I had read everything about authentication from bonita documentation but is impossible do the log in.

Post Method: http://localhost:8080/bonita/loginservice

form-data: username,pass and redirect in headers or body but not working. This is the result:

</p>

    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
        <title>Bonita BPM Portal</title>
        <link rel="icon" type="image/png" href="images/favicon2.ico" />
        <!-- Load LESS CSS -->
        <script type="text/javascript" src="portal/scripts/includes/array.prototype.js"></script>
        <link rel="stylesheet" type="text/css" href="portal/themeResource?theme=portal&location=bonita.css"/>
        <script type="text/javascript" src="portal/scripts/jquery/jquery-1.6.4.js"></script>
        <script>
        $(document).ready(function() {
                if (window != window.top) {
                        try {
                                if (window.frameElement.id == "bonitaframe") {
                                        /* if the login jsp is displayed inside a "bonitaframe" iframe it probably means the session is invalid so refresh the whole page */
                                        window.parent.location.reload();
                                        return;
                                }
                        } catch (e) {
                                /* nothing to do (bonita is probably displayed inside an iframe of a different domain app) */
                        }
                }
                /* Add url hash to form action url */
                var form = $('#LoginForm');
                form.attr('action', form.attr('action') + window.location.hash);
        });
</script>

    </head>
    <body id="LoginPage">
        <div id="LoginHeader">
            <h1>
                <span>Welcome to</span> Bonita BPM Portal
            </h1>
        </div>
        <div id="floater"></div>
        <div id="LoginFormContainer" >
            <div id="logo">
                <img src="portal/themeResource?theme=portal&location=skin/images/login-logo.png"/>
               
            </div>
            <div class="body">
                <form id="LoginForm" action="loginservice?" method="post">
                    <div class="header">
                        <h2>Login form</h2>
                               
                    </div>

> *<p class="error">Unable to log in. Please check your username and password.</p>*

                    <div class="formentries">
                        <div class="formentry" title="Enter your login (username)">
                            <div class="label">
                                <label for="username">User</label>
                                               
                            </div>
                            <div class="input">
                                <input title="Username" id="username" name="username" value="" placeholder="User" type="text" tabindex="1" maxlength="255"  />
                                               
                            </div>
                                       
                        </div>
                        <div class="formentry" title="Enter your password">
                            <div class="label">
                                <label for="password">Password</label>
                                               
                            </div>
                            <div class="input">
                                <input title="Password" id="password" name="password" type="password" tabindex="2" maxlength="50" placeholder="Password"  />
                                               
                            </div>
                            <input name="_l" type="hidden" value="en_US" />
                                       
                        </div>
                               
                    </div>
                    <div class="formactions">
                        <input type="submit" value="Login"  />
                               
                    </div>
                       
                </form>
               
            </div>
       
        </div>
    </body>

Please someone has tested REST calls from Web browser?

Comments

Submitted by david_122 on Fri, 08/04/2017 - 22:25

Same issue. What am I doing wrong?

1 answer

1
0
-1

I don't use Postman but use ARC for chrome...REST works.

Note: if chrome has updated to level 60 you may find there are issues this is fixed in release 7.5.4 released 20170803.

from the release notes:

An issue with Google Chrome version 60 has been identified and impacts all versions of Bonita up to 7.5.3
(included). We choose not to release 7.5.3 and instead build a new version (7.5.4) that includes 7.5.3
modifications and a fix for Chrome
.

I've just tried Postman and can't get it to work there...but as I say - I use ARC and it works fine...

I suggest using ARC... :)

regards
Seán

PS: While you may not like the answer, it gives a possible solution, please mark as resolved.

Notifications