func (c *Client) CreateUser(
	ctx context.Context,
	req *types.CreateUserRequest,
) (*types.CreateUserResponse, error) {
	resp := &types.CreateUserResponse{}
	err := c.postRequest(
		fmt.Sprintf(
			"/users",
		),
		req,
		resp,
	)
	return resp, err
}
CreateUser will create the user, authorize the user and grant them a cookie-based session
package client
import (
	"context"
	"fmt"
	"github.com/porter-dev/porter/api/types"
)
func (c *Client) AuthCheck(ctx context.Context) (*types.GetAuthenticatedUserResponse, error) {
	resp := &types.GetAuthenticatedUserResponse{}
	err := c.getRequest(
		fmt.Sprintf(
			"/users/current",
		),
		nil,
		resp,
	)
	return resp, err
}
func (c *Client) Login(ctx context.Context, req *types.LoginUserRequest) (*types.GetAuthenticatedUserResponse, error) {
	resp := &types.GetAuthenticatedUserResponse{}
	err := c.postRequest(
		fmt.Sprintf(
			"/login",
		),
		req,
		resp,
	)
	return resp, err
}
func (c *Client) Logout(ctx context.Context) error {
	err := c.postRequest(
		fmt.Sprintf(
			"/logout",
		),
		nil,
		nil,
	)
	if err != nil {
		return err
	}
	return c.deleteCookie()
}