Merge pull request #215 from sgotti/gateway_move_auth_api
gateway: move authentication apis to /api/v1alpha/auth
This commit is contained in:
commit
3e611f6cd1
|
@ -315,14 +315,14 @@ func (g *Gateway) Run(ctx context.Context) error {
|
|||
|
||||
apirouter.Handle("/version", versionHandler).Methods("GET")
|
||||
|
||||
apirouter.Handle("/auth/login", loginUserHandler).Methods("POST")
|
||||
apirouter.Handle("/auth/authorize", authorizeHandler).Methods("POST")
|
||||
apirouter.Handle("/auth/register", registerHandler).Methods("POST")
|
||||
apirouter.Handle("/auth/oauth2/callback", oauth2callbackHandler).Methods("GET")
|
||||
|
||||
// TODO(sgotti) add auth to these requests
|
||||
reposRouter.Handle("/repos/{rest:.*}", reposHandler).Methods("GET", "POST")
|
||||
|
||||
router.Handle("/api/login", loginUserHandler).Methods("POST")
|
||||
router.Handle("/api/authorize", authorizeHandler).Methods("POST")
|
||||
router.Handle("/api/register", registerHandler).Methods("POST")
|
||||
router.Handle("/api/oauth2/callback", oauth2callbackHandler).Methods("GET")
|
||||
|
||||
router.Handle("/webhooks", webhooksHandler).Methods("POST")
|
||||
router.PathPrefix("/").HandlerFunc(handlers.NewWebBundleHandlerFunc(g.c.APIExposedURL))
|
||||
|
||||
|
|
|
@ -430,7 +430,7 @@ func (c *Client) RegisterUser(ctx context.Context, req *gwapitypes.RegisterUserR
|
|||
}
|
||||
|
||||
res := new(gwapitypes.RegisterUserResponse)
|
||||
resp, err := c.getParsedResponse(ctx, "POST", "/register", nil, jsonContent, bytes.NewReader(reqj), res)
|
||||
resp, err := c.getParsedResponse(ctx, "POST", "/auth/register", nil, jsonContent, bytes.NewReader(reqj), res)
|
||||
return res, resp, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue