github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/pkg/api/server/register_auth.go (about) 1 package server 2 3 import ( 4 "net/http" 5 6 "github.com/hanks177/podman/v4/pkg/api/handlers/compat" 7 "github.com/gorilla/mux" 8 ) 9 10 func (s *APIServer) registerAuthHandlers(r *mux.Router) error { 11 // swagger:operation POST /auth compat SystemAuth 12 // --- 13 // summary: Check auth configuration 14 // tags: 15 // - system (compat) 16 // produces: 17 // - application/json 18 // parameters: 19 // - in: body 20 // name: authConfig 21 // description: Authentication to check 22 // schema: 23 // $ref: "#/definitions/AuthConfig" 24 // responses: 25 // 200: 26 // $ref: "#/responses/systemAuthResponse" 27 // 500: 28 // $ref: "#/responses/internalError" 29 r.Handle(VersionedPath("/auth"), s.APIHandler(compat.Auth)).Methods(http.MethodPost) 30 // Added non version path to URI to support docker non versioned paths 31 r.Handle("/auth", s.APIHandler(compat.Auth)).Methods(http.MethodPost) 32 return nil 33 }