func (c *Client) CreateUserWithToken(token, password, hotpToken string) (*Session, error) {
	out, err := c.PostJSON(c.Endpoint("signuptokens", "users"), createUserWithTokenReq{
		Token:     token,
		Password:  password,
		HOTPToken: hotpToken,
	})
	if err != nil {
		return nil, trace.Wrap(err)
	}
	var sess *Session
	if err := json.Unmarshal(out.Bytes(), &sess); err != nil {
		return nil, trace.Wrap(err)
	}
	return sess, nil
}
// CreateUserWithToken creates account with provided token and password.
// Account username and hotp generator are taken from token data.
// Deletes token after account creation.
CreateUserWithToken creates account with provided token and password.
Account username and hotp generator are taken from token data.
Deletes token after account creation.
// CreateUserWithToken creates account with provided token and password . // Account username and hotp generator are taken from token data . // Deletes token after account creation .
func (c *Client) CreateUserWithToken(token, password, hotpToken string) (*Session, error) {
	out, err := c.PostJSON(c.Endpoint("signuptokens", "users"), createUserWithTokenReq{
		Token:     token,
		Password:  password,
		HOTPToken: hotpToken,
	})
	if err != nil {
		return nil, trace.Wrap(err)
	}
	var sess *Session
	if err := json.Unmarshal(out.Bytes(), &sess); err != nil {
		return nil, trace.Wrap(err)
	}
	return sess, nil
}
func ( c * Client ) CreateUserWithToken ( token , password , hotpToken string ) ( * Session , error ) { out , err := c . PostJSON ( c . Endpoint ( " " , " " ) , createUserWithTokenReq { Token : token , Password : password , HOTPToken : hotpToken , } ) if err != nil { return nil , trace . Wrap ( err ) } var sess * Session if err := json . Unmarshal ( out . Bytes ( ) , & sess ) ; err != nil { return nil , trace . Wrap ( err ) } return sess , nil }
CreateUserWithToken creates account with provided token and password.
CreateUserWithToken creates account with provided token and password .