Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Langhammer <[email protected]>
  • Loading branch information
BeryJu committed Oct 24, 2024
1 parent 4546f03 commit b7392fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion authentik/outposts/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def send(self, request, stream=False, timeout=None, verify=True, cert=None, prox
converted.ssl_verify = verify
converted.timeout = timeout if timeout else self.default_timeout

Check warning on line 68 in authentik/outposts/http.py

View check run for this annotation

Codecov / codecov/patch

authentik/outposts/http.py#L66-L68

Added lines #L66 - L68 were not covered by tests
# Pick one of the outpost instances
state = choice(self.__outpost.state)
state = choice(self.__outpost.state) # nosec
self.__logger.debug("sending HTTP request to outpost", uid=converted.uid)
async_to_sync(self.__layer.send)(

Check warning on line 72 in authentik/outposts/http.py

View check run for this annotation

Codecov / codecov/patch

authentik/outposts/http.py#L70-L72

Added lines #L70 - L72 were not covered by tests
state.uid,
Expand Down
6 changes: 5 additions & 1 deletion cmd/scim/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (s *SCIMOutpost) Start() error {
return
}
s.log.WithField("res", res.StatusCode).Debug("sending HTTP response")
s.ac.SendWS(ak.WebsocketInstructionProviderSpecific, map[string]interface{}{
err = s.ac.SendWS(ak.WebsocketInstructionProviderSpecific, map[string]interface{}{
"sub_type": "http_response",
"response_channel": rd.ResponseChannel,
"response": map[string]interface{}{
Expand All @@ -161,6 +161,10 @@ func (s *SCIMOutpost) Start() error {
"body": base64.StdEncoding.EncodeToString(body),
},
})
if err != nil {
s.log.WithError(err).Warning("failed to send http response")
return
}
})
return nil
}
Expand Down

0 comments on commit b7392fe

Please sign in to comment.