@Brian
I think you are trying to access these vars *before* the Keycloak component
has been initialized.
The global approach is to use Observables to be notified when states have
been updated.
For example, to get the user data, you should subscribe to the
"authenticatedObserver" and then use the "tokenParsed" field wich
contains
the decoded JWT :
Keycloak.authenticatedObs.subscribe(auth => {
if(auth) {
console.info(Keycloak.tokenParsed.given_name);
}
});
I will try to provide a basic example and a more detailed documentation
soon.
--
View this message in context:
http://keycloak-user.88327.x6.nabble.com/keycloak-user-Angular-2-with-Web...
Sent from the keycloak-user mailing list archive at
Nabble.com.