mirror of https://github.com/status-im/consul.git
agent: implement an always-200 authorize endpoint
This commit is contained in:
parent
a54d1af421
commit
d28ee70a56
|
@ -885,3 +885,16 @@ func (s *HTTPServer) AgentConnectCALeafCert(resp http.ResponseWriter, req *http.
|
|||
|
||||
return &reply, nil
|
||||
}
|
||||
|
||||
// AgentConnectAuthorize
|
||||
//
|
||||
// POST /v1/agent/connect/authorize
|
||||
func (s *HTTPServer) AgentConnectAuthorize(resp http.ResponseWriter, req *http.Request) (interface{}, error) {
|
||||
// Test the method
|
||||
if req.Method != "POST" {
|
||||
return nil, MethodNotAllowedError{req.Method, []string{"POST"}}
|
||||
}
|
||||
|
||||
// NOTE(mitchellh): return 200 for now. To be implemented later.
|
||||
return nil, nil
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ func init() {
|
|||
registerEndpoint("/v1/agent/check/warn/", []string{"PUT"}, (*HTTPServer).AgentCheckWarn)
|
||||
registerEndpoint("/v1/agent/check/fail/", []string{"PUT"}, (*HTTPServer).AgentCheckFail)
|
||||
registerEndpoint("/v1/agent/check/update/", []string{"PUT"}, (*HTTPServer).AgentCheckUpdate)
|
||||
registerEndpoint("/v1/agent/connect/authorize", []string{"POST"}, (*HTTPServer).AgentConnectAuthorize)
|
||||
registerEndpoint("/v1/agent/connect/ca/roots", []string{"GET"}, (*HTTPServer).AgentConnectCARoots)
|
||||
registerEndpoint("/v1/agent/connect/ca/leaf/", []string{"GET"}, (*HTTPServer).AgentConnectCALeafCert)
|
||||
registerEndpoint("/v1/agent/service/register", []string{"PUT"}, (*HTTPServer).AgentRegisterService)
|
||||
|
|
Loading…
Reference in New Issue