I see an error on SecurityContextImpl (on the client) after right authentication on keycloak server,
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.
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?
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 as implementation ... dirty ... but now i have keycloak security working.