Package io.apicurio.registry.mt
Class TenantContextLoader
- java.lang.Object
-
- io.apicurio.registry.mt.TenantContextLoader
-
@ApplicationScoped public class TenantContextLoader extends Object
Component responsible for creating instances ofRegistryTenantContextso they can be set withTenantContext- Author:
- Fabian Martinez
-
-
Constructor Summary
Constructors Constructor Description TenantContextLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RegistryTenantContextdefaultTenantContext()voidinvalidateTenantCache()voidinvalidateTenantInCache(String tenantId)RegistryTenantContextloadBatchJobContext(String tenantId)Used for internal stuff where there isn't a JWT token from the user request available This won't perform any authorization check.RegistryTenantContextloadRequestContext(String tenantId)Used for user requests where there is a JWT token in the request This method enforces authorization and uses JWT token information to verify if the tenant is authorized to access the organization indicated in the JWTvoidonStart(io.quarkus.runtime.StartupEvent ev)
-
-
-
Method Detail
-
onStart
public void onStart(@Observes io.quarkus.runtime.StartupEvent ev)
-
loadRequestContext
public RegistryTenantContext loadRequestContext(String tenantId)
Used for user requests where there is a JWT token in the request This method enforces authorization and uses JWT token information to verify if the tenant is authorized to access the organization indicated in the JWT- Parameters:
tenantId-- Returns:
-
loadBatchJobContext
public RegistryTenantContext loadBatchJobContext(String tenantId)
Used for internal stuff where there isn't a JWT token from the user request available This won't perform any authorization check.- Parameters:
tenantId-- Returns:
-
defaultTenantContext
public RegistryTenantContext defaultTenantContext()
-
invalidateTenantInCache
public void invalidateTenantInCache(String tenantId)
-
invalidateTenantCache
public void invalidateTenantCache()
-
-