<commit_before>package oauth2

import (
	"encoding/json"
	"errors"
	"fmt"
	"net/http"
	"strings"

	"github.com/influxdata/chronograf"
	"golang.org/x/oauth2"
)

var _ Provider = &Generic{}

// Generic provides OAuth Login and Callback server and is modeled
// after the Github OAuth2 provider. Callback will set an authentication
// cookie.  This cookie's value is a JWT containing the user's primary
// email address.
type Generic struct {
	ClientID     string
	ClientSecret string
	Domains      []string // Optional email domain checking
	AuthURL      string
	TokenURL     string
	APIURL       string // APIURL returns OpenID Userinfo
	Logger       chronograf.Logger
}

// Name is the name of the provider
func (g *Generic) Name() string {
	return "generic"
}<commit_msg>Add renaming of generic oauth2 provider<commit_after>package oauth2

import (
	"encoding/json"
	"errors"
	"fmt"
	"net/http"
	"strings"

	"github.com/influxdata/chronograf"
	"golang.org/x/oauth2"
)

var _ Provider = &Generic{}

// Generic provides OAuth Login and Callback server and is modeled
// after the Github OAuth2 provider. Callback will set an authentication
// cookie.  This cookie's value is a JWT containing the user's primary
// email address.
type Generic struct {
	PageName     string // Name displayed on the login page
	ClientID     string
	ClientSecret string
	Domains      []string // Optional email domain checking
	AuthURL      string
	TokenURL     string
	APIURL       string // APIURL returns OpenID Userinfo
	Logger       chronograf.Logger
}

// Name is the name of the provider
func (g *Generic) Name() string {
	if g.PageName == "" {
		return "generic"
	}
	return g.PageName
}
{'fraction_non_alphanumeric': 0.08248655110579797, 'fraction_numerical': 0.0041841004184100415, 'mean_word_length': 3.314432989690722, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6391366', 'n_tokens_mistral': 519, 'n_tokens_neox': 502, 'n_words': 187}