I do have a profile page which is accessible just if the user has been logged in. In other words, if user calls: localhost:9595/profile
, then the profile service/component checks the session and if the user is logged in or not.
If logged in, then I want to get its email from session and pre fill the username input field with the email.
My issue is how to get the username/email from the session and pre fill the username-field with it. Would it be done just with saving the session and getting the username as mentioned in this question and this one, or would it be different in my case? I am a kind of confused regarding what I get as response from the server:
{
"username": "b43d74a8-9de4-4b06-b9b0-52d88808ba59",
"universalId": "id=b43d74a8-9de4-4b06-b9b0-52d88808ba59,ou=user,o=cons,dc=org",
"latestAccessTime": "2018-03-13T07:10:33Z",
"maxIdleExpirationTime": "2018-03-13T07:40:33Z",
"maxSessionExpirationTime": "2018-03-13T09:10:32Z"
}