class ConnectionsController extends Controller

Constants

protected SIGNATURE_TOLERANCE

The number of seconds either side of the current time a request signature remains valid.

Methods

verify(Request $request, string $appId)

Verify that the incoming request is valid.

resolveApplication(string $appId)

Resolve the application instance for the given ID.

void
verifySignature(Request $request, Application $application, string $body, array $query)

Verify the Pusher authentication signature.

static string
formatQueryParametersForVerification(array $params)

Format the given parameters into the correct format for signature verification.

void
verifySignatureTimestamp(array $query)

Verify that the request signature has not expired.

__invoke(Request $request, string $appId)

Handle the request.

Details

in Controller at line 30
protected VerifiedRequestContext verify(Request $request, string $appId)

Verify that the incoming request is valid.

Returns a per-request context DTO instead of storing state on instance properties — controllers are shared across coroutines in Hypervel.

Parameters

Request $request
string $appId

Return Value

VerifiedRequestContext

in Controller at line 48
protected Application resolveApplication(string $appId)

Resolve the application instance for the given ID.

Parameters

string $appId

Return Value

Application

Exceptions

HttpException

in Controller at line 66
protected void verifySignature(Request $request, Application $application, string $body, array $query)

Verify the Pusher authentication signature.

Parameters

Request $request
Application $application
string $body
array $query

Return Value

void

Exceptions

HttpException

in Controller at line 103
static protected string formatQueryParametersForVerification(array $params)

Format the given parameters into the correct format for signature verification.

Parameters

array $params

Return Value

string

in Controller at line 119
protected void verifySignatureTimestamp(array $query)

Verify that the request signature has not expired.

Parameters

array $query

Return Value

void

Exceptions

HttpException

at line 16
JsonResponse __invoke(Request $request, string $appId)

Handle the request.

Parameters

Request $request
string $appId

Return Value

JsonResponse