MCPcopy
hub / github.com/CodisLabs/codis / verifyXAuth

Method verifyXAuth

pkg/proxy/proxy_api.go:90–102  ·  view source on GitHub ↗
(params martini.Params)

Source from the content-addressed store, hash-verified

88}
89
90func (s *apiServer) verifyXAuth(params martini.Params) error {
91 if s.proxy.IsClosed() {
92 return ErrClosedProxy
93 }
94 xauth := params["xauth"]
95 if xauth == "" {
96 return errors.New("missing xauth, please check product name & auth")
97 }
98 if xauth != s.proxy.XAuth() {
99 return errors.New("invalid xauth, please check product name & auth")
100 }
101 return nil
102}
103
104func (s *apiServer) Overview() (int, string) {
105 return rpc.ApiResponseJson(s.proxy.Overview(StatsFull))

Callers 11

XPingMethod · 0.95
StatsMethod · 0.95
SlotsMethod · 0.95
StartMethod · 0.95
ResetStatsMethod · 0.95
ForceGCMethod · 0.95
LogLevelMethod · 0.95
ShutdownMethod · 0.95
FillSlotsMethod · 0.95
SetSentinelsMethod · 0.95
RewatchSentinelsMethod · 0.95

Calls 2

IsClosedMethod · 0.45
XAuthMethod · 0.45

Tested by

no test coverage detected