Repository navigation
Conversation
Hand-written SocketService (not generated from the Postman contract):
POST socket/token returns { token, expires_in, expires_at } for a
server-side exchange; the browser presents only the token.
This was referenced Oct 6, 2026
feat(socket-auth): show channel authorization failures in the sockets viewer
fleetbase/dev-engine#51
Open
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fleetbase\Sdk\Services\SocketService, exposed as$fleetbase->socket/$fleetbase->socket()/service('socket').$fleetbase->socket->token(array $options = [])sendsPOST socket/tokenand returns the decoded{ token, expires_in, expires_at }. A server without realtime auth configured answers 404, raised asNotFoundException.docs/api-coverage.md. When the Postman collection gains the route it can move into the generated set.socket.authenticate(token)flow; CHANGELOG[Unreleased]entry. No version bump.Why
Realtime channels are moving to authenticated subscriptions. PHP backends need a supported way to exchange their secret key for a short-lived token so that browsers never hold the API key.
Test plan
tests/Fleetbase/SocketTest.php: request method/path and decoded payload; 404 maps toNotFoundException.FleetbaseTestservice list includessocket.Related PRs
Part of the authenticated realtime channels rollout (socket auth), one PR per repo:
fleetbase/core-api ^1.6.69)fleetbase/fleetbase-socketserver, compose/helm/installer, console socket test page