onecx-tenant

Implementation of the [tkit-quarkus-rest-context](https://github.com/1000kit/tkit-quarkus/blob/main/extensions/rest-context/) tenant resolver service.

Installation

If you want to use this extension, you need to add the org.tkit.onecx.quarkus:onecx-tenant extension first to your build file.

For instance, with Maven, add the following dependency to your POM file:

<dependency>
    <groupId>org.tkit.onecx.quarkus</groupId>
    <artifactId>onecx-tenant</artifactId>
    <version>2.0.0</version>
</dependency>

Usage

To activate multi-tenancy also for hibernate, add the following maven dependency to your project [tkit-quarkus-jpa-tenant](https://github.com/1000kit/tkit-quarkus/tree/main/extensions/jpa-tenant).

<dependency>
    <groupId>org.tkit.quarkus.lib</groupId>
    <artifactId>tkit-quarkus-jpa-tenant</artifactId>
</dependency>

Configuration

Configuration property fixed at build time - All other configuration properties are overridable at runtime

Configuration property

Type

Default

Enable or disable cache for the token

Environment variable: ONECX_TENANT_CACHE_ENABLED

boolean

true

Tenant client URL configuration. This property is alias for rest-client generated configuration property quarkus.rest-client.onecx_tenant.url

Environment variable: ONECX_TENANT_SERVICE_CLIENT_URL

string

http://onecx-tenant-svc:8080