fix: subscription socket auth#89
Merged
Merged
Conversation
The GameServer API registers two JWT issuers ("player" and "partner", symmetric HS256 so the sample runs with no external identity provider) and wires AddTraxJwtDispatcher, so GraphQL subscriptions authenticate over the WebSocket by routing the connection_init token to a scheme by its iss claim. A Development-only GET /dev/token/{player|partner} endpoint mints a token to try, and Google id-tokens become a third dispatched issuer when Google:ClientId is set.
The E2E subscription tests now connect with player- and partner-issuer tokens (proving both issuers dispatch over WS) plus an unroutable token that is rejected. The test WebSocket client gained an authToken option alongside apiKey.
The GameServer sample's subscription auth demo relies on the dispatcher-aware socket interceptor shipped in Trax.Api 1.38.1. Bump the Trax.Api.* pins from 1.38.0 and regenerate the sample lockfiles so CI restores the released packages that contain the fix.
|
This PR is included in version 1.29.1 |
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.
No description provided.