From 6a703ef960f7a98109324dcfa98caf7ea7671edc Mon Sep 17 00:00:00 2001 From: Jan Knobloch Date: Fri, 22 Apr 2022 11:18:59 +0200 Subject: [PATCH] Update security-keycloak-authorization.adoc added Note for proper Injection of AuthzClient which is only available if policy enforcer is enabled. --- docs/src/main/asciidoc/security-keycloak-authorization.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/src/main/asciidoc/security-keycloak-authorization.adoc b/docs/src/main/asciidoc/security-keycloak-authorization.adoc index 436ff96cb5af2..3dc5b523a71ed 100644 --- a/docs/src/main/asciidoc/security-keycloak-authorization.adoc +++ b/docs/src/main/asciidoc/security-keycloak-authorization.adoc @@ -368,6 +368,8 @@ public class ProtectedResource { } ---- +Note: If you want to use the `AuthzClient` directly make sure to to set `quarkus.keycloak.policy-enforcer.enable=true` otherwise there is no Bean available for injection. + == Mapping Protected Resources By default, the extension is going to fetch resources on-demand from Keycloak where their `URI` are used to map the resources in your application that should be protected.