fix(whip): support https endpoints with Bearer auth#2121
Open
andoodle wants to merge 1 commit into
Open
Conversation
WhipClient could not publish to https WHIP servers: - validSchemes only allowed "http", so an https URL was rejected with "Endpoint malformed". - setAuthorization was an unimplemented TODO() that crashed any caller. - the signaling request hardcoded http:// and POSTed to only the appName path segment, using the last path segment as the token. Standard WHIP servers expect a POST to the full endpoint URL with an Authorization: Bearer token. Changes: - accept "https" in validSchemes. - build the signaling POST from the parsed scheme (https over TLS) and the full endpoint path. - implement setAuthorization to carry the Bearer token (mapped from the shared user/password API). Tested against a standard https WHIP ingest (Dolby/Millicast): the publish is accepted (201 + ICE) where it was previously rejected.
Owner
|
Hello, Thank you for the auth implementation. Can you test it and confirm me that all is fine? After that, I will merge it |
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.
WhipClientcan't publish to https WHIP servers:validSchemesonly allows"http", so anhttps://URL is rejected with "Endpoint malformed".setAuthorizationis an unimplementedTODO()that crashes any caller.http://and POSTs to only theappNamepath segment, using the last path segment as the token. Standard WHIP servers expect a POST to the full endpoint URL with anAuthorization: Bearertoken.Changes
"https"invalidSchemessetAuthorizationto carry the Bearer token (mapped from the shareduser/passwordAPI)Tested against a standard https WHIP ingest (Dolby/Millicast): the publish is accepted (
201+ ICE) where it was previously rejected with "Endpoint malformed".