MCPcopy
hub / github.com/harness/harness / Unauthorized

Function Unauthorized

app/api/render/render_error.go:37–39  ·  view source on GitHub ↗

Unauthorized writes the json-encoded message for an unauthorized error.

(ctx context.Context, w http.ResponseWriter)

Source from the content-addressed store, hash-verified

35
36// Unauthorized writes the json-encoded message for an unauthorized error.
37func Unauthorized(ctx context.Context, w http.ResponseWriter) {
38 UserError(ctx, w, usererror.ErrUnauthorized)
39}
40
41// Forbidden writes the json-encoded message for a forbidden error.
42func Forbidden(ctx context.Context, w http.ResponseWriter) {

Callers 10

CheckAuthFunction · 0.92
CheckAuthWithChallengeFunction · 0.92
CheckAuthHeaderFunction · 0.92
CheckNugetAPIKeyFunction · 0.92
returnUnauthorisedFunction · 0.92
BlockSessionTokenFunction · 0.92
AttemptFunction · 0.92
RestrictToFunction · 0.92
TestWriteUnauthorizedFunction · 0.70

Calls 1

UserErrorFunction · 0.85

Tested by 1

TestWriteUnauthorizedFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…