-
1. Re: Errai + KeyCloak
jmbarone Apr 18, 2017 8:59 AM (in response to jmbarone)I see an error on SecurityContextImpl (on the client) after right authentication on keycloak server,
"java.lang.NoSuchMethodError:org.keycloak.representations.AccessToken.getAudience()Ljava/lang/String;"
The AccesToken class extends IDToken that already extends JsonWebToken class and this has the method getAudience ... but i see the method have the @JsonIgnore annotation.
Maybe errai are trying to create the user assuming the token contains the field Audience ... and it's not the case.
-
2. Re: Errai + KeyCloak
jmbarone Apr 24, 2017 3:41 PM (in response to jmbarone)Well, after some time without work on this problem, i find that the problem exists in class KeyAuthenticationService.
When try to create the keycloak user, on the method getKeycloakUserProperties, the property audience it's String[] but doesn't exits a constructor String, String[] on the inner class KeycloakProperty and it fails.
The solution it's very simple ... add a constructor String, String[] on these inner class.
These can be fixed on the stable release and on the new version 4?
Thanks.
-
-
4. Re: Errai + KeyCloak
jmbarone Apr 25, 2017 11:09 AM (in response to mbarkley)Ok Max, i opened https://issues.jboss.org/browse/ERRAI-1037 ... i hope i do it well :-)
FYI i take the sources and then add a maven module with a "patch" on my project, (i delete the dependency with the "real" security-keycloak module and added to my "patch" module) and works like a charm.
I simply add the (String, String[]) constructor on KeyAuthenticationService.KeycloakProperty taking the String[0] as implementation ... dirty ... but now i have keycloak security working.
Thanks.