Skip to content

Instantly share code, notes, and snippets.

@dasniko dasniko/
Created Nov 27, 2017

What would you like to do?
Create AuthzClient with Spring Boot Adapter
public AuthzClient authzClient(KeycloakSpringBootProperties kcProperties) {
Configuration configuration = new Configuration(
kcProperties.getAuthServerUrl(), kcProperties.getRealm(),
kcProperties.getResource(), kcProperties.getCredentials(), null);
return AuthzClient.create(configuration);

This comment has been minimized.

Copy link

musabqamri123 commented Feb 12, 2019

You can use the authzclient created by adapter..
CMKcConfigResolver cmKcConfigResolver = (CMKcConfigResolver)configResolver;
KeycloakDeployment deployment = cmKcConfigResolver.getDeployment();
this.authzClient = deployment.getPolicyEnforcer().getClient();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.