func (c *Client) UpsertPassword(user string,
	password []byte) (hotpURL string, hotpQR []byte, err error) {
	out, err := c.PostJSON(
		c.Endpoint("users", user, "web", "password"),
		upsertPasswordReq{
			Password: string(password),
		})
	if err != nil {
		return "", nil, trace.Wrap(err)
	}
	var re *upsertPasswordResponse
	if err := json.Unmarshal(out.Bytes(), &re); err != nil {
		return "", nil, err
	}
	return re.HotpURL, re.HotpQR, err
}
// UpsertPassword updates web access password for the user
UpsertPassword updates web access password for the user
// UpsertPassword updates web access password for the user
func (c *Client) UpsertPassword(user string,
	password []byte) (hotpURL string, hotpQR []byte, err error) {
	out, err := c.PostJSON(
		c.Endpoint("users", user, "web", "password"),
		upsertPasswordReq{
			Password: string(password),
		})
	if err != nil {
		return "", nil, trace.Wrap(err)
	}
	var re *upsertPasswordResponse
	if err := json.Unmarshal(out.Bytes(), &re); err != nil {
		return "", nil, err
	}
	return re.HotpURL, re.HotpQR, err
}
func ( c * Client ) UpsertPassword ( user string , password [ ] byte ) ( hotpURL string , hotpQR [ ] byte , err error ) { out , err := c . PostJSON ( c . Endpoint ( " " , user , " " , " " ) , upsertPasswordReq { Password : string ( password ) , } ) if err != nil { return " " , nil , trace . Wrap ( err ) } var re * upsertPasswordResponse if err := json . Unmarshal ( out . Bytes ( ) , & re ) ; err != nil { return " " , nil , err } return re . HotpURL , re . HotpQR , err }
UpsertPassword updates web access password for the user
UpsertPassword updates web access password for the user