feat(cli): add websocket auth message configuration support#12050
Open
fern-support wants to merge 6 commits intomainfrom
Open
feat(cli): add websocket auth message configuration support#12050fern-support wants to merge 6 commits intomainfrom
fern-support wants to merge 6 commits intomainfrom
Conversation
Add support for automatic authentication message sending after websocket connection. This enables SDKs to handle message-level auth patterns where the OAuth token is sent as the first message after connecting. Changes: - Add WebSocketAuthMessageConfig type to IR with messageId and tokenPropertyPath - Add auth-message field to WebSocketChannelSchema in Fern definition - Update IR migration v63-to-v62 for backward compatibility - Add x-fern-auth-message extension for AsyncAPI specs - Update Python generator to send auth message after connecting Co-Authored-By: blank@buildwithfern.com <blank@buildwithfern.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: blank@buildwithfern.com <blank@buildwithfern.com>
Co-Authored-By: blank@buildwithfern.com <blank@buildwithfern.com>
Co-Authored-By: blank@buildwithfern.com <blank@buildwithfern.com>
Co-Authored-By: blank@buildwithfern.com <blank@buildwithfern.com>
Co-Authored-By: blank@buildwithfern.com <blank@buildwithfern.com>
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.
Description
Link to Devin run: https://app.devin.ai/sessions/50ce682058004d24beb034e75ffe07d7
Requested by: @fern-support
Adds support for automatic authentication message sending after websocket connection. This enables SDKs to handle message-level auth patterns where the OAuth token is sent as the first message after connecting (as opposed to connection-level auth via headers/query params).
Changes Made
WebSocketAuthMessageConfigtype to IR withmessageIdandtokenPropertyPathfieldsauth-messagefield toWebSocketChannelSchemain Fern definitionx-fern-auth-messageextension for AsyncAPI specsHuman Review Checklist
get_headers().get("Authorization", "").replace("Bearer ", "")). The async version uses_async_token(). Verify these approaches are robust.messageIdfield unused: ThemessageIdis defined in the config but the Python generator only usestokenPropertyPathto build the nested dict. Is this intentional or should the message format include the messageId?getattr(websocket, "auth_message", None)in Python generator for compatibility with older IR types packages.Updates Since Last Revision
seed/python-sdk/seed.ymlirVersion from v62 to v63authMessagefieldCI Status
Some CI checks are failing with what appear to be unrelated issues:
valid-navigation > simpletest timing out (5000ms timeout in fern-definition-validator)These failures don't appear to be related to the websocket auth message changes.
Testing
pnpm run check)