feat: implement scoped join attempts and tickets (#10)
quality-gate / quality (push) Successful in 1m1s
quality-gate / quality (push) Successful in 1m1s
Closes #10
This commit is contained in:
@@ -58,4 +58,22 @@ it when hosting stops. Use `IRendezvousPublisherClient` and
|
||||
`IRendezvousSessionBrowserClient` as injection seams in game tests. The SDK disposes
|
||||
the requests and responses it creates but never disposes the supplied `HttpClient`.
|
||||
|
||||
See the repository's ADR 0007 for retry, paging, ownership, and failure semantics.
|
||||
The host-side `ConnectionTicketValidator` is a bounded, thread-safe one-time gate.
|
||||
Authorize only tickets delivered by the authenticated Rendezvous introduction,
|
||||
then consume the exact ticket presented by the direct LiteNetLib connection:
|
||||
|
||||
```csharp
|
||||
using ConnectionTicketValidator tickets = new();
|
||||
tickets.TryAuthorize(attemptId, expectedTicket, expiresAt);
|
||||
ConnectionTicketConsumptionResult admission = tickets.Consume(
|
||||
attemptId,
|
||||
presentedTicket);
|
||||
```
|
||||
|
||||
An `Accepted` ticket authorizes only this connection attempt. The game must still
|
||||
apply its own player identity, capacity, ban, and gameplay admission rules. Revoke
|
||||
the attempt on cancellation and dispose the validator during host shutdown so its
|
||||
keyed ticket digests are zeroed.
|
||||
|
||||
See the repository's ADR 0007 for HTTP ownership/retry semantics and ADR 0008 for
|
||||
join-capability and connection-ticket security semantics.
|
||||
|
||||
Reference in New Issue
Block a user