MCPcopy
hub / github.com/perkeep/perkeep / UserPass

Struct UserPass

pkg/auth/auth.go:235–242  ·  view source on GitHub ↗

UserPass is used when the auth string provided in the config is of the kind "userpass:username:pass" Possible options appended to the config string are "+localhost" and "vivify=pass", where pass will be the alternative password which only allows the vivify operation.

Source from the content-addressed store, hash-verified

233// "+localhost" and "vivify=pass", where pass will be the
234// alternative password which only allows the vivify operation.
235type UserPass struct {
236 Username, Password string
237 OrLocalhost bool // if true, allow localhost ident auth too
238
239 // VivifyPass, if not nil, is the alternative password used (only) for the vivify operation.
240 // It is checked when uploading, but Password takes precedence.
241 VivifyPass *string
242}
243
244func (up *UserPass) AllowedAccess(req *http.Request) Operation {
245 user, pass, err := httputil.BasicAuth(req)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected