2 weeks ago
Hello SAP Community,
I am working on a Cloud Foundry Approuter in SAP BTP and have the following custom middleware code:
const approuter = require('@sap/approuter');
const ar = approuter();
ar.beforeRequestHandler.use('/', function (req, res, next) {
if (req.url.includes('/sap/opu/odata/MY_SERVICE/')) {
req.headers.email_user = req.user.name;
console.log("username");
console.log(req.user.name);
console.log("headers");
console.log(req.headers);
console.log("req");
console.log(req);
}
next();
});
ar.start();
In this setup, I am trying to retrieve the country of the authenticated user. I know the user's email is accessible via req.user.name and I have also found the JWT Access Token in the request. However, the token does not include any region or country information.
Since country information is maintained in SAP IAS (Identity Authentication Service), I’m wondering:
Any pointers or advice would be greatly appreciated!
Thanks in advance!
Mohammed
Request clarification before answering.
User | Count |
---|---|
53 | |
9 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.