MCPcopy
hub / github.com/perkeep/perkeep / SetMode

Function SetMode

pkg/auth/auth.go:202–204  ·  view source on GitHub ↗

SetMode sets the given authentication mode as the only allowed one for future requests. That is, it replaces all modes that were previously added.

(m AuthMode)

Source from the content-addressed store, hash-verified

200// SetMode sets the given authentication mode as the only allowed one for
201// future requests. That is, it replaces all modes that were previously added.
202func SetMode(m AuthMode) {
203 modes = []AuthMode{m}
204}
205
206// AddMode adds the given authentication mode to the list of modes that future
207// requests can authenticate against.

Callers 3

checkValidAuthMethod · 0.92
TestMultiModeFunction · 0.85
TestEmptyPasswordsFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestMultiModeFunction · 0.68
TestEmptyPasswordsFunction · 0.68