Hi Stian,
Thanks for the reply.
But in this example also they are not fetching logged in user ID
I also went through JavaScript adapter documentation where i got to know Subject property of Keycloak can help me to get the user id but how to write it in code I am not getting. Tried many solutions but not getting userid.
I am using below code as if now to authenticate through Keycloak.
var keycloakAuth = new Keycloak('javascript/keycloak.json');
keycloakAuth.init({ onLoad: 'login-required' }).success(function () {
}).error(function () {
});
Kindly suggest how can i get logged in userid here.