Struct AdmissionRequest
What a connecting client presented, as the application's admission hook sees it.
public readonly ref struct AdmissionRequest
- Inherited Members
Remarks
Nothing here is interpreted by the engine. Kind is checked against the declared set and no further; Token is opaque
bytes the engine never reads. In the first version there is no engine-side security at all
(design/Subscriptions/03-wire-protocol.md § 12 W22), which is why Principal is always null today: the
asynchronous authenticator that produces one arrives with the security work.
A ref struct on purpose. The hook cannot stash the request, capture it in a closure or hand it to another thread — which is the compiler enforcing the rule that admission is synchronous and stateless rather than a comment asking for it.
Constructors
AdmissionRequest(string, string, uint, ReadOnlySpan<byte>, SessionLimits, object, EndPoint, string)
Creates a request. The transport builds one per HELLO; a test builds one directly.
public AdmissionRequest(string kind, string token, uint requestedCaps, ReadOnlySpan<byte> helloPayload, SessionLimits requestedLimits, object appData, EndPoint remote, string transport)
Parameters
kindstringThe application-declared name the client presented, or an empty string when it named none.
tokenstringThe client's opaque credential. Never read by the engine.
requestedCapsuintThe capability bits the client asked for. Granted ⊆ requested ∩ known ∩ authorized.
helloPayloadReadOnlySpan<byte>The client's application payload, at most HelloPayloadMaxBytes bytes.
requestedLimitsSessionLimitsLimits proposed ahead of the hook. null means the operator's defaults.
appDataobjectApplication data produced before the hook — the authenticator's, when one exists.
remoteEndPointThe client's address, as the transport sees it.
transportstringThe transport's name:
tcp,ws,webtransport,fake.
Properties
AppData
Application data produced before the hook — the authenticator's, when one exists. null in the first version.
public object AppData { get; }
Property Value
HelloPayload
The client's application payload. It is borrowed from the transport's buffer and must be copied to be kept.
public ReadOnlySpan<byte> HelloPayload { get; }
Property Value
Kind
The application-declared kind the client presented. Empty when it named none.
public string Kind { get; }
Property Value
Principal
The authenticated principal. Always null until the security work lands an authenticator.
public ClaimsPrincipal Principal { get; }
Property Value
Remote
The client's address. null for an in-process link.
public EndPoint Remote { get; }
Property Value
RequestedCaps
The capability bits the client asked for.
public uint RequestedCaps { get; }
Property Value
RequestedLimits
Limits proposed before the hook ran. The hook is free to hand back different ones.
public SessionLimits RequestedLimits { get; }
Property Value
Token
The client's opaque credential, at most TokenMaxBytes bytes on the wire.
public string Token { get; }
Property Value
Transport
The transport's name: tcp, ws, webtransport, fake.
public string Transport { get; }