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.
| 233 | // "+localhost" and "vivify=pass", where pass will be the |
| 234 | // alternative password which only allows the vivify operation. |
| 235 | type 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 | |
| 244 | func (up *UserPass) AllowedAccess(req *http.Request) Operation { |
| 245 | user, pass, err := httputil.BasicAuth(req) |
nothing calls this directly
no outgoing calls
no test coverage detected