All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.keycloak.pep.TenantPolicyConfigResolver Maven / Gradle / Ivy

Go to download

Policy enforcer using Keycloak-managed permissions to control access to protected resources

There is a newer version: 3.17.0
Show newest version
package io.quarkus.keycloak.pep;

import io.quarkus.keycloak.pep.runtime.KeycloakPolicyEnforcerTenantConfig;
import io.quarkus.oidc.OidcRequestContext;
import io.quarkus.oidc.OidcTenantConfig;
import io.smallrye.mutiny.Uni;
import io.vertx.ext.web.RoutingContext;

/**
 * A tenant resolver is responsible for resolving the {@link KeycloakPolicyEnforcerTenantConfig} for tenants, dynamically.
 */
public interface TenantPolicyConfigResolver {

    /**
     * Returns a {@link KeycloakPolicyEnforcerTenantConfig} given a {@code RoutingContext} and tenant id.
     *
     * @param routingContext routing context; nullable
     * @param tenantConfig tenant config; never null
     * @param requestContext request context; never null
     *
     * @return the tenant configuration. If the uni resolves to {@code null}, indicates that the default
     *         configuration/tenant should be chosen
     */
    Uni resolve(RoutingContext routingContext, OidcTenantConfig tenantConfig,
            OidcRequestContext requestContext);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy