MCPcopy
hub / github.com/perkeep/perkeep / websocketTokenMatches

Function websocketTokenMatches

pkg/auth/auth.go:375–379  ·  view source on GitHub ↗
(req *http.Request)

Source from the content-addressed store, hash-verified

373}
374
375func websocketTokenMatches(req *http.Request) bool {
376 return req.Method == "GET" &&
377 req.Header.Get("Upgrade") == "websocket" &&
378 req.FormValue("authtoken") == Token()
379}
380
381func TriedAuthorization(req *http.Request) bool {
382 // Currently a simple test just using HTTP basic auth

Callers 3

AllowedAccessMethod · 0.85
AllowedAccessMethod · 0.85
AllowedAccessMethod · 0.85

Calls 2

TokenFunction · 0.85
GetMethod · 0.65

Tested by

no test coverage detected