MCPcopy
hub / github.com/perkeep/perkeep / AuthMode

Interface AuthMode

pkg/auth/auth.go:65–72  ·  view source on GitHub ↗

An AuthMode is the interface implemented by diffent authentication schemes.

Source from the content-addressed store, hash-verified

63// An AuthMode is the interface implemented by diffent authentication
64// schemes.
65type AuthMode interface {
66 // AllowedAccess returns a bitmask of all operations
67 // this user/request is allowed to do.
68 AllowedAccess(req *http.Request) Operation
69 // AddAuthHeader inserts in req the credentials needed
70 // for a client to authenticate.
71 AddAuthHeader(req *http.Request)
72}
73
74// UnauthorizedSender may be implemented by AuthModes which want to
75// handle sending unauthorized.

Callers 10

AllowedWithAuthFunction · 0.65
ServeHTTPMethod · 0.65
handleMasterQueryMethod · 0.65
RemoveBlobsMethod · 0.65
newRequestMethod · 0.65
TestMultiModeFunction · 0.65
TestEmptyPasswordsFunction · 0.65
addAuthFunction · 0.65
getUploadURLFunction · 0.65
uploadFileFunction · 0.65

Implementers 5

tailscaleAuthpkg/auth/tailscaleauth.go
tokenAuthpkg/auth/auth.go
UserPasspkg/auth/auth.go
Nonepkg/auth/auth.go
DevAuthpkg/auth/auth.go

Calls

no outgoing calls

Tested by

no test coverage detected