feat: extend Java config, Schema, and DB for selfhosted licensing SDK

This commit is contained in:
2026-05-18 22:20:14 +08:00
parent fbce298f2b
commit 91aabb500c
6 changed files with 132 additions and 7 deletions
@@ -11,4 +11,5 @@ import com.fasterxml.jackson.annotation.JsonProperty;
@JsonInclude(JsonInclude.Include.NON_NULL)
public record FeatureMapping(
@JsonProperty("bitanswerFeatureId") Integer bitanswerFeatureId,
@JsonProperty("bitanswerFeatureName") String bitanswerFeatureName) {}
@JsonProperty("bitanswerFeatureName") String bitanswerFeatureName,
@JsonProperty("selfhostedFeatureKey") String selfhostedFeatureKey) {}
@@ -11,4 +11,13 @@ import com.fasterxml.jackson.annotation.JsonProperty;
@JsonInclude(JsonInclude.Include.NON_NULL)
public record SelfhostedConfigSection(
@JsonProperty("baseUrl") String baseUrl,
@JsonProperty("tenantKey") String tenantKey) {}
@JsonProperty("tenantKey") String tenantKey,
@JsonProperty("offlineGraceDays") Integer offlineGraceDays,
@JsonProperty("heartbeatIntervalHours") Integer heartbeatIntervalHours,
@JsonProperty("publicKeyPem") String publicKeyPem) {
public SelfhostedConfigSection {
offlineGraceDays = offlineGraceDays != null ? offlineGraceDays : 7;
heartbeatIntervalHours = heartbeatIntervalHours != null ? heartbeatIntervalHours : 24;
}
}
@@ -17,7 +17,7 @@ import cn.craftlabs.auth.internal.NativeBridge;
*/
public final class SelfHostedAuthProvider implements AuthProvider {
static {
System.loadLibrary("craftlabs_auth_bitanswer");
System.loadLibrary("craftlabs_auth_core");
}
private long nativeHandle;