This commit is contained in:
2026-08-25 14:46:06 +08:00
parent 5abc7543ae
commit f325d57fc1
106 changed files with 3682 additions and 450 deletions
@@ -0,0 +1,28 @@
package com.baiyue.overseassecurity.dto;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import java.time.Instant;
public final class OverseasSecurityDtos {
private OverseasSecurityDtos() { }
public record Acknowledgement(String eventId, String result, Instant receivedAt) { }
public record ValidationRequest(@NotNull @Min(1) Long userId,
@NotNull @Min(0) Long tenantId,
@NotNull @Min(0) Long tokenVersion,
@NotNull @Min(0) Long permissionVersion) { }
public record ValidationResponse(boolean valid, FailureReason failureReason) {
public static ValidationResponse accepted() { return new ValidationResponse(true, null); }
public static ValidationResponse rejected(FailureReason reason) { return new ValidationResponse(false, reason); }
}
public enum FailureReason {
USER_DISABLED,
TENANT_DISABLED,
PERMISSION_VERSION_STALE
}
}