mirror of
https://github.com/hpd840321/craftlabs-authorization-sdk.git
synced 2026-06-09 10:00:30 +08:00
feat: extend Java config, Schema, and DB for selfhosted licensing SDK
This commit is contained in:
@@ -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) {}
|
||||
|
||||
+10
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user