on 03-19-2021 6:38 PM
How do I get the current user details (first name and last name) in CAP? So far I do only get the user id in the req.user object.
{
"id": "<...>",
"_roles": {
"any": true,
"identified-user": true,
"authenticated-user": true
},
"attr": {},
"tenant": "<...>"
}
I tried to follow this blog:
https://blogs.sap.com/2020/04/06/show-current-user-details-in-cloud-foundry-apps-with-ias/
But the req.user in CAP does not seem to have a token property.
below object has the roles , yes -
let myRoles = req._.user.roles ;
Not sure why , but it returns 3 roles [ any , identified-user , authenticated-user ]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.