feat(phase3): 收口父子单与全链路验收

This commit is contained in:
2026-08-10 12:23:43 +08:00
parent b294695169
commit 75d5fd4e26
55 changed files with 1110 additions and 115 deletions
@@ -0,0 +1,15 @@
package com.baiyue.common.security;
import java.util.Set;
/** Server-side access session and its current authorization snapshot. */
public record AccessTokenSession(int version, Long userId, Set<String> roles,
Set<String> permissions) {
public AccessTokenSession {
if (version != 1 || userId == null || userId <= 0) {
throw new IllegalArgumentException("Invalid access token session");
}
roles = roles == null ? Set.of() : Set.copyOf(roles);
permissions = permissions == null ? Set.of() : Set.copyOf(permissions);
}
}