Records for the JSON the clients read, leaving out only the fields TypeScript leaves undefined. GameLoop is the single thread that owns live state; ManualScheduler replaces Jest's fake timers in tests. Keycloak tokens are verified with jose4j and the same checks as before.
12 lines
402 B
Java
12 lines
402 B
Java
package app.playmancala.model;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
|
// A logged in user. `id` is also the player id in games; `name` is null for legacy userKey clients.
|
|
public record AuthUser(
|
|
String id,
|
|
@JsonInclude(JsonInclude.Include.NON_NULL) String name,
|
|
@JsonProperty("isGuest") boolean isGuest) {
|
|
}
|