<commit_before>package reddit

import (
	"golang.org/x/oauth2"
)

type Authenticator struct {
	config *oauth2.Config
	state  string
}

func NewAuthenticator(clientID string, clientSecret string, state string, scopes ...string) *Authenticator {
	config := &oauth2.Config{
		ClientID:     clientID,
		ClientSecret: clientSecret,
		Scopes:       scopes,
		Endpoint: oauth2.Endpoint{
			AuthURL:  "https://www.reddit.com/api/v1/authorize",
			TokenURL: "https://www.reddit.com/api/v1/access_token",
		},
	}

	return &Authenticator{config: config, state: state}
}

func (a *Authenticator) GetAuthenticationUrl() string {<commit_msg>Add OAuth2 scopes<commit_after>package reddit

import (
	"golang.org/x/oauth2"
)

type Authenticator struct {
	config *oauth2.Config
	state  string
}

const (
	ScopeIdentity        = "identity"
	ScopeEdit            = "edit"
	ScopeFlair           = "flair"
	ScopeHistory         = "history"
	ScopeModConfig       = "modconfig"
	ScopeModFlair        = "modflair"
	ScopeModLog          = "modlog"
	ScopeModWiki         = "modwiki"
	ScopeMySubreddits    = "mysubreddits"
	ScopePrivateMessages = "privatemessages"
	ScopeRead            = "read"
	ScopeReport          = "report"
	ScopeSave            = "save"
	ScopeSubmit          = "submit"
	ScopeSubscribe       = "subscribe"
	ScopeVote            = "vote"
	ScopeWikiEdit        = "wikiedit"
	ScopeWikiRead        = "wikiread"
)

func NewAuthenticator(clientID string, clientSecret string, state string, scopes ...string) *Authenticator {
	config := &oauth2.Config{
		ClientID:     clientID,
		ClientSecret: clientSecret,
		Scopes:       scopes,
		Endpoint: oauth2.Endpoint{
			AuthURL:  "https://www.reddit.com/api/v1/authorize",
			TokenURL: "https://www.reddit.com/api/v1/access_token",
		},
	}

	return &Authenticator{config: config, state: state}
}

func (a *Authenticator) GetAuthenticationUrl() string {
{'fraction_non_alphanumeric': 0.11246684350132626, 'fraction_numerical': 0.006896551724137931, 'mean_word_length': 3.1818181818181817, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, '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': '6670234', 'n_tokens_mistral': 661, 'n_tokens_neox': 641, 'n_words': 129}