Skip to content

Commit f28b0b5

Browse files
cuishuanggopherbot
authored andcommitted
all: fix some comments
Change-Id: I3dd3785de7071e34320a148f35d4caa97cfd6db1 Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/713361 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Sean Liao <sean@liao.dev> Auto-Submit: Sean Liao <sean@liao.dev> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
1 parent fd15e0f commit f28b0b5

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

clientcredentials/clientcredentials.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// license that can be found in the LICENSE file.
44

55
// Package clientcredentials implements the OAuth2.0 "client credentials" token flow,
6-
// also known as the "two-legged OAuth 2.0".
6+
// also known as "two-legged OAuth 2.0".
77
//
88
// This should be used when the client is acting on its own behalf or when the client
99
// is the resource owner. It may also be used when requesting access to protected

google/google.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ func (f *credentialsFile) tokenSource(ctx context.Context, params CredentialsPar
252252
// Further information about retrieving access tokens from the GCE metadata
253253
// server can be found at https://cloud.google.com/compute/docs/authentication.
254254
func ComputeTokenSource(account string, scope ...string) oauth2.TokenSource {
255-
// refresh 3 minutes and 45 seconds early. The shortest MDS cache is currently 4 minutes, so any
255+
// Refresh 3 minutes and 45 seconds early. The shortest MDS cache is currently 4 minutes, so any
256256
// refreshes earlier are a waste of compute.
257257
earlyExpirySecs := 225 * time.Second
258258
return computeTokenSource(account, earlyExpirySecs, scope...)

oauth2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const (
9898
// in the POST body as application/x-www-form-urlencoded parameters.
9999
AuthStyleInParams AuthStyle = 1
100100

101-
// AuthStyleInHeader sends the client_id and client_password
101+
// AuthStyleInHeader sends the client_id and client_secret
102102
// using HTTP Basic Authorization. This is an optional style
103103
// described in the OAuth2 RFC 6749 section 2.3.1.
104104
AuthStyleInHeader AuthStyle = 2

pkce.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func S256ChallengeFromVerifier(verifier string) string {
5151
return base64.RawURLEncoding.EncodeToString(sha[:])
5252
}
5353

54-
// S256ChallengeOption derives a PKCE code challenge derived from verifier with
54+
// S256ChallengeOption derives a PKCE code challenge from the verifier with
5555
// method S256. It should be passed to [Config.AuthCodeURL] or [Config.DeviceAuth]
5656
// only.
5757
func S256ChallengeOption(verifier string) AuthCodeOption {

token.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ func (t *Token) WithExtra(extra any) *Token {
103103
}
104104

105105
// Extra returns an extra field.
106-
// Extra fields are key-value pairs returned by the server as a
106+
// Extra fields are key-value pairs returned by the server as
107107
// part of the token retrieval response.
108108
func (t *Token) Extra(key string) any {
109109
if raw, ok := t.raw.(map[string]any); ok {

transport.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) {
5858
var cancelOnce sync.Once
5959

6060
// CancelRequest does nothing. It used to be a legacy cancellation mechanism
61-
// but now only it only logs on first use to warn that it's deprecated.
61+
// but now only logs on first use to warn that it's deprecated.
6262
//
6363
// Deprecated: use contexts for cancellation instead.
6464
func (t *Transport) CancelRequest(req *http.Request) {

0 commit comments

Comments
 (0)