-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Roles #7
Comments
In the onReady callback, you have access to the keycloak object. You could maybe get the roles by accessing |
Okay, is there a way to access the underlying keycloak object using this.$keycloak? |
Not yet, I'm afraid. There are certain callback functions, like onAuth*, on the keycloak object, which we'd rather not expose. Because overriding them would break the plugin's behavior. Maybe we'll expose more of the underlying object in the near future... In the meantime go for my suggestion above, or use the token from |
I don't think I can use onReady, because no authentication has taken place at that point. I'll look into parsing this.$keycloak.token though. |
Hi again... |
I vote for exposing both |
Sorry for delayed responses, I am not in front of a computer as much as I'd like to be these days. :) I'll leave that up to you gurus, I just need a somewhat future-proof way to authorize using roles. Implementing a function that maps to hasRealmRole seems to be the easiest in my pea-sized brain. |
Exposed hasRealmRole and hasResourceRole in v1.0.9 |
How can I call the underlying keycloak adapter's hasRealmRole( ) function? I am missing how to check roles with this plugin.
The text was updated successfully, but these errors were encountered: