MCPcopy Index your code
hub / github.com/CodisLabs/codis / verifyXAuth

Method verifyXAuth

pkg/topom/topom_api.go:130–142  ·  view source on GitHub ↗
(params martini.Params)

Source from the content-addressed store, hash-verified

128}
129
130func (s *apiServer) verifyXAuth(params martini.Params) error {
131 if s.topom.IsClosed() {
132 return ErrClosedTopom
133 }
134 xauth := params["xauth"]
135 if xauth == "" {
136 return errors.New("missing xauth, please check product name & auth")
137 }
138 if xauth != s.topom.XAuth() {
139 return errors.New("invalid xauth, please check product name & auth")
140 }
141 return nil
142}
143
144func (s *apiServer) Overview() (int, string) {
145 o, err := s.topom.Overview()

Callers 15

XPingMethod · 0.95
StatsMethod · 0.95
SlotsMethod · 0.95
ReloadMethod · 0.95
CreateProxyMethod · 0.95
OnlineProxyMethod · 0.95
ReinitProxyMethod · 0.95
RemoveProxyMethod · 0.95
CreateGroupMethod · 0.95
RemoveGroupMethod · 0.95
ResyncGroupMethod · 0.95
ResyncGroupAllMethod · 0.95

Calls 2

IsClosedMethod · 0.45
XAuthMethod · 0.45

Tested by

no test coverage detected