MCPcopy Index your code
hub / github.com/perkeep/perkeep / newBasicAuth

Function newBasicAuth

pkg/auth/auth.go:148–154  ·  view source on GitHub ↗
(arg string)

Source from the content-addressed store, hash-verified

146}
147
148func newBasicAuth(arg string) (AuthMode, error) {
149 pieces := strings.Split(arg, ":")
150 if len(pieces) != 2 {
151 return nil, fmt.Errorf("invalid basic auth syntax. got %q, want \"username:password\"", arg)
152 }
153 return NewBasicAuth(pieces[0], pieces[1]), nil
154}
155
156// NewBasicAuth returns a UserPass Authmode, adequate to support HTTP
157// basic authentication.

Callers

nothing calls this directly

Calls 1

NewBasicAuthFunction · 0.85

Tested by

no test coverage detected