chore(scim): deliver SCIM responses through a protocol helper - #2657
Open
xlgmokha wants to merge 1 commit into
Open
chore(scim): deliver SCIM responses through a protocol helper#2657xlgmokha wants to merge 1 commit into
xlgmokha wants to merge 1 commit into
Conversation
Extract SendJSONAs from SendJSON so callers can specify a Content-Type, and add a protocol package that wraps it with the SCIM media type.
xlgmokha
force-pushed
the
xlgmokha/auth-1362a
branch
from
July 30, 2026 21:11
ae237ce to
e47f1c3
Compare
xlgmokha
marked this pull request as ready for review
July 30, 2026 21:12
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.
Extract
SendJSONAsfromSendJSONso callers can specify aContent-Type, and add a protocol package that wraps it with the SCIM media type.Extracted from #2643
What kind of change does this PR introduce?
Refactor. Extracts a
scim/protocolpackage that writes responses using the SCIM media type, so the discovery endpoints in the follow-up PRs have one place to send from.What is the current behavior?
shared.SendJSONhardcodesapplication/json, so it is not usable for SCIM.scim.Server.notImplementedwrites its response by hand instead, settingContent-Typefrom a localmediaTypeconst and callingWriteHeader(501)directly.What is the new behavior?
shared.SendJSONAs(w, status, contentType, obj)takes the Content-Type;SendJSONdelegates to it withapplication/json.internal/api/scim/protocolpackage holdsMediaType(application/scim+json) andSend.notImplementedgoes throughprotocol.Send, and the localmediaTypeconst is gone.Additional context