Skip to content

Commit 24d1721

Browse files
committed
Typos
1 parent 4902a49 commit 24d1721

File tree

28 files changed

+39
-39
lines changed

28 files changed

+39
-39
lines changed

examples/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ func main() {
152152
)
153153

154154
// OpenID Connect is based on OpenID Connect Auto Discovery URL (https://openid.net/specs/openid-connect-discovery-1_0-17.html)
155-
// because the OpenID Connect provider initialize it self in the New(), it can return an error which should be handled or ignored
155+
// because the OpenID Connect provider initialize itself in the New(), it can return an error which should be handled or ignored
156156
// ignore the error for now
157157
openidConnect, _ := openidConnect.New(os.Getenv("OPENID_CONNECT_KEY"), os.Getenv("OPENID_CONNECT_SECRET"), "http://localhost:3000/auth/openid-connect/callback", os.Getenv("OPENID_CONNECT_DISCOVERY_URL"))
158158
if openidConnect != nil {

gothic/gothic.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Package gothic wraps common behaviour when using Goth. This makes it quick, and easy, to get up
3-
and running with Goth. Of course, if you want complete control over how things flow, in regards
3+
and running with Goth. Of course, if you want complete control over how things flow, in regard
44
to the authentication process, feel free and use Goth directly.
55
66
See https://github.com/markbates/goth/blob/master/examples/main.go to see this in action.
@@ -151,7 +151,7 @@ func GetAuthURL(res http.ResponseWriter, req *http.Request) (string, error) {
151151

152152
/*
153153
CompleteUserAuth does what it says on the tin. It completes the authentication
154-
process and fetches all of the basic information about the user from the provider.
154+
process and fetches all the basic information about the user from the provider.
155155
156156
It expects to be able to get the name of the provider from the query parameters
157157
as either "provider" or ":provider".

providers/azureadv2/azureadv2.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func userFromReader(r io.Reader, user *goth.User) error {
216216
user.Location = u.OfficeLocation
217217
user.UserID = u.ID
218218
user.AvatarURL = graphAPIResource + fmt.Sprintf("users/%s/photo/$value", u.ID)
219-
// Make sure all of the information returned is available via RawData
219+
// Make sure all the information returned is available via RawData
220220
if err := json.Unmarshal(userBytes, &user.RawData); err != nil {
221221
return err
222222
}

providers/digitalocean/digitalocean.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func (p *Provider) Client() *http.Client {
6464
// Debug is a no-op for the digitalocean package.
6565
func (p *Provider) Debug(debug bool) {}
6666

67-
// BeginAuth asks Github for an authentication end-point.
67+
// BeginAuth asks DigitalOcean for an authentication end-point.
6868
func (p *Provider) BeginAuth(state string) (goth.Session, error) {
6969
url := p.config.AuthCodeURL(state)
7070
session := &Session{

providers/discord/session.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (s Session) Marshal() string {
5353
}
5454

5555
// String is equivalent to Marshal. It returns a JSON representation of the
56-
// of the session.
56+
// session.
5757
func (s Session) String() string {
5858
return s.Marshal()
5959
}

providers/dropbox/dropbox.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ func userFromReader(r io.Reader, user *goth.User) error {
193193
user.FirstName = u.Name.GivenName
194194
user.LastName = u.Name.Surname
195195
user.Name = strings.TrimSpace(fmt.Sprintf("%s %s", u.Name.GivenName, u.Name.Surname))
196-
user.Description = u.Name.DisplayName // Full name plus parenthetical team naem
196+
user.Description = u.Name.DisplayName // Full name plus parenthetical team name
197197
user.Email = u.Email
198198
user.NickName = u.Email // Email is the dropbox username
199199
user.Location = u.Country

providers/fitbit/session.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func (s Session) GetAuthURL() (string, error) {
2727
return s.AuthURL, nil
2828
}
2929

30-
// Authorize completes the the authorization with Fitbit and returns the access
30+
// Authorize completes the authorization with Fitbit and returns the access
3131
// token to be stored for future use.
3232
func (s *Session) Authorize(provider goth.Provider, params goth.Params) (string, error) {
3333
p := provider.(*Provider)

providers/github/session.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ import (
88
"github.com/markbates/goth"
99
)
1010

11-
// Session stores data during the auth process with Github.
11+
// Session stores data during the auth process with GitHub.
1212
type Session struct {
1313
AuthURL string
1414
AccessToken string
1515
}
1616

17-
// GetAuthURL will return the URL set by calling the `BeginAuth` function on the Github provider.
17+
// GetAuthURL will return the URL set by calling the `BeginAuth` function on the GitHub provider.
1818
func (s Session) GetAuthURL() (string, error) {
1919
if s.AuthURL == "" {
2020
return "", errors.New(goth.NoAuthUrlErrorMessage)
2121
}
2222
return s.AuthURL, nil
2323
}
2424

25-
// Authorize the session with Github and return the access token to be stored for future use.
25+
// Authorize the session with GitHub and return the access token to be stored for future use.
2626
func (s *Session) Authorize(provider goth.Provider, params goth.Params) (string, error) {
2727
p := provider.(*Provider)
2828
token, err := p.config.Exchange(goth.ContextForClient(p.Client()), params.Get("code"))

providers/google/google.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ func (p *Provider) SetHostedDomain(hd string) {
190190
p.authCodeOptions = append(p.authCodeOptions, oauth2.SetAuthURLParam("hd", hd))
191191
}
192192

193-
// SetLoginHint sets the login_hint parameter for the google OAuth call.
194-
// Use this to prompt the user to login with a specific account.
193+
// SetLoginHint sets the login_hint parameter for the Google OAuth call.
194+
// Use this to prompt the user to log in with a specific account.
195195
// See https://developers.google.com/identity/protocols/oauth2/openid-connect#login-hint
196196
func (p *Provider) SetLoginHint(loginHint string) {
197197
if loginHint == "" {
@@ -200,7 +200,7 @@ func (p *Provider) SetLoginHint(loginHint string) {
200200
p.authCodeOptions = append(p.authCodeOptions, oauth2.SetAuthURLParam("login_hint", loginHint))
201201
}
202202

203-
// SetAccessType sets the access_type parameter for the google OAuth call.
203+
// SetAccessType sets the access_type parameter for the Google OAuth call.
204204
// If an access token is being requested, the client does not receive a refresh token unless a value of offline is specified.
205205
// See https://developers.google.com/identity/protocols/oauth2/openid-connect#access-type-param
206206
func (p *Provider) SetAccessType(at string) {

providers/influxcloud/influxcloud.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020

2121
const (
2222
// The hard coded domain is difficult here because influx cloud has an acceptance
23-
// domain that is different and we will need that for enterprise development.
23+
// domain that is different, and we will need that for enterprise development.
2424
defaultDomain string = "cloud.influxdata.com"
2525
userAPIPath string = "/api/v1/user"
2626
domainEnvKey string = "INFLUXCLOUD_OAUTH_DOMAIN"

providers/linkedin/linkedin.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ func userFromReader(reader io.Reader, user *goth.User) error {
199199
// only retrieve data where the authorization method allows public (unauthorized) access
200200
if element.AuthorizationMethod == "PUBLIC" {
201201
for _, identifier := range element.Identifiers {
202-
// check to ensure the identifer type is a url linking to the image
202+
// check to ensure the identifier type is a url linking to the image
203203
if identifier.IdentifierType == "EXTERNAL_URL" {
204204
avatarURL = identifier.Identifier
205205
// we only need the first image url

providers/linkedin/session.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ import (
88
"github.com/markbates/goth"
99
)
1010

11-
// Session stores data during the auth process with Linkedin.
11+
// Session stores data during the auth process with LinkedIn.
1212
type Session struct {
1313
AuthURL string
1414
AccessToken string
1515
ExpiresAt time.Time
1616
}
1717

18-
// GetAuthURL will return the URL set by calling the `BeginAuth` function on the Linkedin provider.
18+
// GetAuthURL will return the URL set by calling the `BeginAuth` function on the LinkedIn provider.
1919
func (s Session) GetAuthURL() (string, error) {
2020
if s.AuthURL == "" {
2121
return "", errors.New(goth.NoAuthUrlErrorMessage)
2222
}
2323
return s.AuthURL, nil
2424
}
2525

26-
// Authorize the session with Linkedin and return the access token to be stored for future use.
26+
// Authorize the session with LinkedIn and return the access token to be stored for future use.
2727
func (s *Session) Authorize(provider goth.Provider, params goth.Params) (string, error) {
2828
p := provider.(*Provider)
2929
token, err := p.config.Exchange(goth.ContextForClient(p.Client()), params.Get("code"))

providers/mailru/mailru.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func New(clientID, clientSecret, redirectURL string, scopes ...string) *Provider
4545
}
4646
}
4747

48-
// Provider is the implementation of `goth.Provider` for accessing Github.
48+
// Provider is the implementation of `goth.Provider` for accessing MAILRU.
4949
type Provider struct {
5050
name string
5151
clientID string

providers/microsoftonline/microsoftonline.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) {
112112
}
113113

114114
// RefreshTokenAvailable refresh token is provided by auth provider or not
115-
// not available for microsoft online as session size hit the limit of max cookie size
115+
// available for microsoft online as session size hit the limit of max cookie size
116116
func (p *Provider) RefreshTokenAvailable() bool {
117117
return false
118118
}

providers/nextcloud/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ SESSION_SECRET=1 \
7070
./examples
7171
```
7272

73-
Afterwards, you should be able to login via Nextcloud in the examples app.
73+
Afterwards, you should be able to log in via Nextcloud in the examples app.
7474

7575
## Running the Provider Test
7676

providers/onedrive/onedrive.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func userFromReader(r io.Reader, user *goth.User) error {
142142
user.Email = u.Email["account"]
143143
user.Name = u.Name
144144
user.NickName = u.Name
145-
user.UserID = u.Email["account"] //onedrive doesn't provide separate user_id
145+
user.UserID = u.Email["account"] // onedrive doesn't provide separate user_id
146146

147147
return nil
148148
}

providers/openidConnect/openidConnect.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ func (p *Provider) BeginAuth(state string) (goth.Session, error) {
190190
return session, nil
191191
}
192192

193-
// FetchUser will use the the id_token and access requested information about the user.
193+
// FetchUser will use the id_token and access requested information about the user.
194194
func (p *Provider) FetchUser(session goth.Session) (goth.User, error) {
195195
sess := session.(*Session)
196196

providers/oura/errors.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ type APIError struct {
66
Description string
77
}
88

9-
// NewAPIError initializes an oura APIError
9+
// NewAPIError initializes an Oura APIError
1010
func NewAPIError(code int, description string) APIError {
1111
return APIError{code, description}
1212
}

providers/oura/session.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func (s Session) GetAuthURL() (string, error) {
2727
return s.AuthURL, nil
2828
}
2929

30-
// Authorize completes the the authorization with Oura and returns the access
30+
// Authorize completes the authorization with Oura and returns the access
3131
// token to be stored for future use.
3232
func (s *Session) Authorize(provider goth.Provider, params goth.Params) (string, error) {
3333
p := provider.(*Provider)

providers/paypal/session.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/markbates/goth"
1010
)
1111

12-
// Session stores data during the auth process with Paypal.
12+
// Session stores data during the auth process with PayPal.
1313
type Session struct {
1414
AuthURL string
1515
AccessToken string
@@ -19,15 +19,15 @@ type Session struct {
1919

2020
var _ goth.Session = &Session{}
2121

22-
// GetAuthURL will return the URL set by calling the `BeginAuth` function on the Paypal provider.
22+
// GetAuthURL will return the URL set by calling the `BeginAuth` function on the PayPal provider.
2323
func (s Session) GetAuthURL() (string, error) {
2424
if s.AuthURL == "" {
2525
return "", errors.New(goth.NoAuthUrlErrorMessage)
2626
}
2727
return s.AuthURL, nil
2828
}
2929

30-
// Authorize the session with Paypal and return the access token to be stored for future use.
30+
// Authorize the session with PayPal and return the access token to be stored for future use.
3131
func (s *Session) Authorize(provider goth.Provider, params goth.Params) (string, error) {
3232
p := provider.(*Provider)
3333
token, err := p.config.Exchange(goth.ContextForClient(p.Client()), params.Get("code"))

providers/salesforce/session.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ import (
1717
// On salesforce.com, navigate to where you app is configured. (Setup > Create > Apps)
1818
// Under Connected Apps, click on your application's name to view its settings, then click Edit.
1919
// Under Selected OAuth Scopes, ensure that "Perform requests on your behalf at any time" is selected. You must include this even if you already chose "Full access".
20-
// Save, then try your OAuth flow again. It make take a short while for the update to propagate.
20+
// Save, then try your OAuth flow again. It takes a short while for the update to propagate.
2121
type Session struct {
2222
AuthURL string
2323
AccessToken string
2424
RefreshToken string
25-
ID string //Required to get the user info from sales force
25+
ID string // Required to get the user info from sales force
2626
}
2727

2828
var _ goth.Session = &Session{}
@@ -50,7 +50,7 @@ func (s *Session) Authorize(provider goth.Provider, params goth.Params) (string,
5050

5151
s.AccessToken = token.AccessToken
5252
s.RefreshToken = token.RefreshToken
53-
s.ID = token.Extra("id").(string) //Required to get the user info from sales force
53+
s.ID = token.Extra("id").(string) // Required to get the user info from sales force
5454
return token.AccessToken, err
5555
}
5656

providers/slack/slack.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) {
9191
return user, fmt.Errorf("%s cannot get user information without accessToken", p.providerName)
9292
}
9393

94-
// Get the userID, slack needs userID in order to get user profile info
94+
// Get the userID, Slack needs userID in order to get user profile info
9595
req, _ := http.NewRequest("GET", endpointUser, nil)
9696
req.Header.Add("Authorization", "Bearer "+sess.AccessToken)
9797
response, err := p.Client().Do(req)

providers/spotify/session.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func (s Session) GetAuthURL() (string, error) {
2525
return s.AuthURL, nil
2626
}
2727

28-
// Authorize completes the the authorization with Spotify and returns the access
28+
// Authorize completes the authorization with Spotify and returns the access
2929
// token to be stored for future use.
3030
func (s *Session) Authorize(provider goth.Provider, params goth.Params) (string, error) {
3131
p := provider.(*Provider)

providers/twitch/session.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (s Session) Marshal() string {
5252
}
5353

5454
// String is equivalent to Marshal. It returns a JSON representation of the
55-
// of the session.
55+
// session.
5656
func (s Session) String() string {
5757
return s.Marshal()
5858
}

providers/typetalk/typetalk.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) {
8989
return user, fmt.Errorf("%s cannot get user information without accessToken", p.providerName)
9090
}
9191

92-
// Get user name
92+
// Get username
9393
response, err := p.Client().Get(endpointProfile + "?access_token=" + url.QueryEscape(sess.AccessToken))
9494
if err != nil {
9595
if response != nil {

providers/vk/vk.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func New(clientKey, secret, callbackURL string, scopes ...string) *Provider {
3737
return p
3838
}
3939

40-
// Provider is the implementation of `goth.Provider` for accessing Github.
40+
// Provider is the implementation of `goth.Provider` for accessing VK.
4141
type Provider struct {
4242
ClientKey string
4343
Secret string

providers/wepay/wepay.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) {
106106
}
107107

108108
func newConfig(provider *Provider, scopes []string) *oauth2.Config {
109-
//Wepay is not recoginsing scope, if scope is not present as first paremeter
109+
// Wepay is not recognising scope, if scope is not present as first parameter
110110
newAuthURL := authURL
111111

112112
if len(scopes) > 0 {

user.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ func init() {
1010
}
1111

1212
// User contains the information common amongst most OAuth and OAuth2 providers.
13-
// All of the "raw" datafrom the provider can be found in the `RawData` field.
13+
// All the "raw" data from the provider can be found in the `RawData` field.
1414
type User struct {
1515
RawData map[string]interface{}
1616
Provider string

0 commit comments

Comments
 (0)