26 lines
1.0 KiB
Java
26 lines
1.0 KiB
Java
package com.baiyue.common.event;
|
|
|
|
import java.time.Instant;
|
|
import java.util.Set;
|
|
|
|
/** IAM 向海外服务发布的 V1 安全投影事件负载。 */
|
|
public final class IamSecurityEventsV1 {
|
|
public static final int VERSION = 1;
|
|
|
|
private IamSecurityEventsV1() { }
|
|
|
|
public record UserStatusChanged(long authUserId, long tenantId, String appCode,
|
|
String status, long permissionVersion, Instant changedAt) { }
|
|
|
|
public record TenantStatusChanged(long tenantId, String status, Instant changedAt) { }
|
|
|
|
public record PermissionVersionChanged(long authUserId, long tenantId, String appCode,
|
|
long permissionVersion, String reason, Instant changedAt,
|
|
Set<String> roles, Set<String> authorities) {
|
|
public PermissionVersionChanged {
|
|
roles = roles == null ? Set.of() : Set.copyOf(roles);
|
|
authorities = authorities == null ? Set.of() : Set.copyOf(authorities);
|
|
}
|
|
}
|
|
}
|