Hi experts,
We are in the process of transporting our application from TDD account to OEM account.
In OEM account we set up a BAS instance to do deployment and testing (all default-env files in place).
While trying to run a functionality we are getting 401 Unauthorized due to missing authorization header in request. this functionality is still working fine on our TDD BAS instance.
Below are our configuration and code related to the issue.
In xs-app.json file of our app router folder we have multiple destination and one of which is srv_process which is a nodejs application.
{
"source": "^/process/(.*)$",
"authenticationType": "xsuaa",
"scope": "$XSAPPNAME.User",
"destination": "srv_process"
},<br> On the server.js file of srv_process we have passport module defined.
passport.use('JWT', new xssec.JWTStrategy(services.uaa));
app.use(passport.initialize());
app.use(passport.authenticate('JWT', {
session: false
}));<br> The api call to srv_process is triggered by an custom button from fiori elements app.
sync: function (oContext, aSelectedContexts) {
jQuery.ajax({
url: "/process/import-bank-master",
type: "GET",
success: function (response) {
MessageToast.show(response.msg);
},
error: function (response) {
MessageToast.show(response.msg);
}
})
}<br> In the normal flow the authentication parameter should be automatically attached in the header of ajax request from fiori app but in this case its no working.

Any suggestion to solve the issue is appreciated.Best regards Anoop krishnan.
Request clarification before answering.
| User | Count |
|---|---|
| 10 | |
| 5 | |
| 5 | |
| 5 | |
| 3 | |
| 3 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.