Nexus API Reference

HandshakeResult
in package

Read onlyYes
FinalYes
Tags
psalm-api

Outcome of evaluating a WebSocket upgrade request against the HandshakeGate before the 101 switch. Either the connection is authorized — carrying the request as mutated by the middleware pipeline (path params, _nexus.routed, and the principal attribute stamped by authentication middleware) — or it is rejected with the HTTP response the pipeline produced (401/403/404/...), which must be sent instead of upgrading.

Table of Contents

Properties

$rejection  : ResponseInterface|null
$request  : ServerRequestInterface|null

Methods

authorized()  : self
isAuthorized()  : bool
rejected()  : self

Properties

Methods

authorized()

public static authorized(ServerRequestInterface $request) : self
Parameters
$request : ServerRequestInterface
Return values
self

isAuthorized()

public isAuthorized() : bool
Tags
psalm-assert-if-true

!null $this->request

Return values
bool

rejected()

public static rejected(ResponseInterface $response) : self
Parameters
$response : ResponseInterface
Return values
self
On this page

Search results