MCPcopy Index your code
hub / github.com/coder/coder / scimGetUser

Method scimGetUser

enterprise/coderd/scim.go:149–156  ·  view source on GitHub ↗

scimGetUser intentionally always returns an error saying the user wasn't found. This is done to always force Okta to try and create the user, this way we don't need to implement fetching users twice. @Summary SCIM 2.0: Get user by ID @ID scim-get-user-by-id @Security Authorization @Produce applicat

(rw http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

147//
148//nolint:revive
149func (api *API) scimGetUser(rw http.ResponseWriter, r *http.Request) {
150 if !api.scimVerifyAuthHeader(r) {
151 scimUnauthorized(rw)
152 return
153 }
154
155 _ = handlerutil.WriteError(rw, scim.NewHTTPError(http.StatusNotFound, spec.ErrNotFound.Type, xerrors.New("endpoint will always return 404")))
156}
157
158// We currently use our own struct instead of using the SCIM package. This was
159// done mostly because the SCIM package was almost impossible to use. We only

Callers

nothing calls this directly

Calls 4

scimVerifyAuthHeaderMethod · 0.95
NewHTTPErrorFunction · 0.92
scimUnauthorizedFunction · 0.85
NewMethod · 0.65

Tested by

no test coverage detected