@ebondu
I was trying to extract the info in a callback. Let me know when you push
some big changes I can help test within my project (I'll keep the branch
open).
@keycloak-user
I had to pivot to accomplish integration before end of sprint so I figured
out how to get keycloak-js working within Typescript project using
webpack(a)1.14.0. Modified a few lines of code within a demo example:
https://github.com/keycloak/keycloak/tree/master/examples/demo-template/a...
If anyone is interested in how to accomplish please feel free to message,
it's actually pretty simple and allows you to get away from script tags on
your index.html and bundle the keycloak adapter naturally. (If I get some
free time ill see if I can publish a demo with webpack)
On Thu, Feb 2, 2017 at 3:28 AM, ebondu <dev.ebondu(a)gmail.com> wrote:
@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-Webpack-tp2493p2568.html
Sent from the keycloak-user mailing list archive at
Nabble.com.
_______________________________________________
keycloak-user mailing list
keycloak-user(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user
--
Brian §chofield