Hi,
I see no issue with your workaround, but yeah, we can make this simpler for
SB. Could you please fill a JIRA ? if you already have an idea on how to
address this, please send us a PR and I'll review ...
Thanks.
Pedro Igor
On Mon, Nov 27, 2017 at 4:06 PM, Niko Köbler <niko(a)n-k.de> wrote:
Hi,
the „keycloak-authz-client“ package provides the AuthzClient class, which
can be created by calling „AuthzClient.create()“.
This automatically detects a „keycloak.json“ file and reads values for the
„Configuration“ object.
This is all good.
But when it comes to Spring Boot apps using the Spring Boot Adapter, there
is no „keycloak.json“ file and instead the values are provided via the
„application.properties“ (or .yml, or else).
I would appreciate, that „AuthzClient.create()“ would also be possible to
detect the Spring Boot Property configuration and use it from there.
Was this already discussed? Is it planned? Should I create a ticket for it?
If you already have any ideas, share them with me, I could do a PR for it.
Currently, I’m using a workaround like this:
https://gist.github.com/
dasniko/2c64393da0bca89434670908141914c4 <
https://gist.github.com/dasniko/
2c64393da0bca89434670908141914c4>
So I can inject the AuthzClient everywhere I like and the
KeycloakSpringBootProperties object is injected in the Bean definition.
It’s not a nice way, although it works.
The classes „Configuration“ and „KeycloakSpringBootProperties“ both extend
„AdapterConfig“. Perhaps AuthzClient could also use AdapterConfig, instead
of only Configuration!?
Regards,
- Niko
_______________________________________________
keycloak-user mailing list
keycloak-user(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user