<commit_before>package dummy

import (
	"encoding/json"
	"fmt"
	"github.com/gorilla/mux"
	"github.com/jmcvetta/randutil"
	"github.com/scritch007/ShareMinatorApiGenerator/api"
	"github.com/scritch007/go-tools"
	"github.com/scritch007/shareit/types"
	"io"
	"io/ioutil"
	"net/http"
	"path"
	"strconv"
	"strings"
	"time"
)

type DummyAuth struct {
	AutoValidateAccount bool   `json:"autovalidate"`
	GmailLogin          string `json:"gmail_login"`
	GmailPassword       string `json:"<PASSWORD>"`
	config              *types.Configuration
	challengeId         int
	challengeMap        map[int]*challenge
}

type challenge struct {
	apiChallenge api.RequestDummyGetChallengeOutput
	timer        *time.Timer
}

func NewDummyAuth(config *json.RawMessage, globalConfig *types.Configuration) (d *DummyAuth, err error) {
	d = new(DummyAuth)
	if err = json.Unmarshal(*config, d); nil != err {
		return nil, err
	}
	d.config = globalConfig
	d.challengeId = 0
	d.challengeMap = make(map[int]*challenge)
	return d, nil
}

const (
	Name string = "DummyAuth"
)

func (d *DummyAuth) Name() string {
	return Name
}
func (d *DummyAuth) AddRoutes(r *mux.Router) error {
	r.HandleFunc(path.Join(d.config.HtmlPrefix, api.RequestDummyAuthUrl), d.HandleAuth).Methods("POST")
	r.HandleFunc(path.Join(d.config.HtmlPrefix, api.RequestDummyGetChallengeUrl), d.HandleGetChallenge).Methods("GET")
	return nil
}
<commit_msg>Add the create account capability<commit_after>package dummy

import (
	"encoding/json"
	"fmt"
	"github.com/gorilla/mux"
	"github.com/jmcvetta/randutil"
	"github.com/scritch007/ShareMinatorApiGenerator/api"
	"github.com/scritch007/go-tools"
	"github.com/scritch007/shareit/types"
	"io"
	"io/ioutil"
	"net/http"
	"path"
	"strconv"
	"strings"
	"time"
)

type DummyAuth struct {
	AutoValidateAccount bool   `json:"autovalidate"`
	GmailLogin          string `json:"gmail_login"`
	GmailPassword       string `json:"gmail_password"`
	config              *types.Configuration
	challengeId         int
	challengeMap        map[int]*challenge
}

type challenge struct {
	apiChallenge api.RequestDummyGetChallengeOutput
	timer        *time.Timer
}

func NewDummyAuth(config *json.RawMessage, globalConfig *types.Configuration) (d *DummyAuth, err error) {
	d = new(DummyAuth)
	if err = json.Unmarshal(*config, d); nil != err {
		return nil, err
	}
	d.config = globalConfig
	d.challengeId = 0
	d.challengeMap = make(map[int]*challenge)
	return d, nil
}

const (
	Name string = "DummyAuth"
)

func (d *DummyAuth) Name() string {
	return Name
}
func (d *DummyAuth) AddRoutes(r *mux.Router) error {
	r.HandleFunc(path.Join(d.config.HtmlPrefix, api.RequestDummyAuthUrl), d.HandleAuth).Methods("POST")
	r.HandleFunc(path.Join(d.config.HtmlPrefix, api.RequestDummyGetChallengeUrl), d.HandleGetChallenge).Methods("GET")
	r.HandleFunc(path.Join(d.config.HtmlPrefix, api.RequestDummyCreateUrl), d.HandleCreate).Methods("POST")
	return nil
}

{'fraction_non_alphanumeric': 0.12744761250429407, 'fraction_numerical': 0.006870491240123669, 'mean_word_length': 4.473684210526316, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1158632', 'n_tokens_mistral': 1097, 'n_tokens_neox': 1048, 'n_words': 199}