MCPcopy Create free account
hub / github.com/gogs/gogs / askCredentials

Function askCredentials

internal/route/repo/http.go:38–41  ·  view source on GitHub ↗

askCredentials responses HTTP header and status which informs client to provide credentials.

(c *macaron.Context, status int, text string)

Source from the content-addressed store, hash-verified

36
37// askCredentials responses HTTP header and status which informs client to provide credentials.
38func askCredentials(c *macaron.Context, status int, text string) {
39 c.Header().Set("WWW-Authenticate", "Basic realm=\".\"")
40 c.Error(status, text)
41}
42
43// gitHTTPAction returns the Git HTTP path suffix after /:username/:reponame/.
44func gitHTTPAction(c *macaron.Context) string {

Callers 2

authenticateFunction · 0.85
HTTPContexterFunction · 0.85

Calls 2

HeaderMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected