Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(282)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Issue 125280043: oauth2: Fixing docs and styling issues

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by jbd
Modified:
11 years, 5 months ago
Reviewers:
bradfitz
CC:
adg, golang-codereviews
Visibility:
Public.
oauth2: Fixing docs and styling issues

Patch Set 1 #

Created: 11 years, 5 months ago
Download [raw] [tar.bz2]
Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -12 lines) Patch
M example_test.go View 1 chunk +1 line, -1 line 0 comments Download
M google/example_test.go View 1 chunk +2 lines, -2 lines 0 comments Download
M jwt.go View 2 chunks +7 lines, -7 lines 0 comments Download
M oauth2.go View 1 chunk +2 lines, -2 lines 0 comments Download
Total messages: 3
|
jbd
Fixing the following issues: https://github.com/golang/oauth2/issues/26 https://github.com/golang/oauth2/issues/25 (excluding on-disk PEM file read)
11 years, 5 months ago (2014年08月13日 20:44:59 UTC) #1
Fixing the following issues:
https://github.com/golang/oauth2/issues/26
https://github.com/golang/oauth2/issues/25 (excluding on-disk PEM file read)
Sign in to reply to this message.
bradfitz
LGTM On Wed, Aug 13, 2014 at 1:44 PM, <jbd@google.com> wrote: > Reviewers: bradfitz, > ...
11 years, 5 months ago (2014年08月13日 20:54:03 UTC) #2
LGTM
On Wed, Aug 13, 2014 at 1:44 PM, <jbd@google.com> wrote:
> Reviewers: bradfitz,
>
> Message:
> Fixing the following issues:
>
> https://github.com/golang/oauth2/issues/26
> https://github.com/golang/oauth2/issues/25 (excluding on-disk PEM file
> read)
>
> Description:
> oauth2: Fixing docs and styling issues
>
> Please review this at https://codereview.appspot.com/125280043/
>
> Affected files (+12, -12 lines):
> M example_test.go
> M google/example_test.go
> M jwt.go
> M oauth2.go
>
>
> Index: example_test.go
> diff --git a/example_test.go b/example_test.go
> index d69477ee624ce5be9dd8bffecfb218105902bb81..
> d7afa385b1353cffec42c62cc8d0ddf0854aa584 100644
> --- a/example_test.go
> +++ b/example_test.go
> @@ -56,7 +56,7 @@ func Example_jWTConfig() {
> // The path to the pem file. If you have a p12 file
> instead, you
> // can use `openssl` to export the private key into a pem
> file.
> // $ openssl pkcs12 -in key.p12 -out key.pem -nodes
> - PemFilename: "/path/to/pem/file.pem",
> + PEMFilename: "/path/to/pem/file.pem",
> Scopes: []string{"SCOPE1", "SCOPE2"},
> },
> "https://provider.com/o/oauth2/token")
> Index: google/example_test.go
> diff --git a/google/example_test.go b/google/example_test.go
> index 2df6d6fc926fbc063dcb1bdd7915f666dc487d1f..
> e492507036b31a96599dc22a993dcf5ec70a4bb1 100644
> --- a/google/example_test.go
> +++ b/google/example_test.go
> @@ -49,10 +49,10 @@ func Example_serviceAccounts() {
> // Developer Console (https://console.developers.google.com).
> config, err := google.NewServiceAccountConfig(&oauth2.JWTOptions{
> Email: "xxx@developer.gserviceaccount.com",
> - // The path to the pem file. If you have a p12 file
> instead, you
> + // PEMFilename. If you have a p12 file instead, you
> // can use `openssl` to export the private key into a pem
> file.
> // $ openssl pkcs12 -in key.p12 -out key.pem -nodes
> - PemFilename: "/path/to/pem/file.pem",
> + PEMFilename: "/path/to/pem/file.pem",
> Scopes: []string{
> "https://www.googleapis.com/auth/bigquery",
> },
> Index: jwt.go
> diff --git a/jwt.go b/jwt.go
> index d1ea222b88befbd093a72ffcbab7624e530266d8..
> 82f41c7cf33e1ff7d4de656b0706b295fc9199e9 100644
> --- a/jwt.go
> +++ b/jwt.go
> @@ -27,21 +27,21 @@ var (
> // JWTOptions represents a OAuth2 client's crendentials to retrieve a
> // Bearer JWT token.
> type JWTOptions struct {
> - // ClientID is the OAuth client identifier used when communicating
> with
> + // Email is the OAuth client identifier used when communicating
> with
> // the configured OAuth provider.
> Email string `json:"email"`
>
> - // Private key to sign JWS payloads.
> + // PrivateKey is an RSA private key to sign JWS payloads.
> PrivateKey *rsa.PrivateKey `json:"-"`
>
> - // The path to a pem container that includes your private key.
> + // The path to a PEM container that includes your private key.
> // If PrivateKey is set, this field is ignored.
> //
> // If you have a p12 file instead, you
> - // can use `openssl` to export the private key into a pem file.
> + // can use `openssl` to export the private key into a PEM file.
> // $ openssl pkcs12 -in key.p12 -out key.pem -nodes
> - // Pem file should contain your private key.
> - PemFilename string `json:"pemfilename"`
> + // PEM file should contain your private key.
> + PEMFilename string `json:"pemfilename"`
>
> // Scopes identify the level of access being requested.
> Scopes []string `json:"scopes"`
> @@ -57,7 +57,7 @@ func NewJWTConfig(opts *JWTOptions, aud string)
> (*JWTConfig, error) {
> if opts.PrivateKey != nil {
> return &JWTConfig{opts: opts, aud: audURL, key:
> opts.PrivateKey}, nil
> }
> - contents, err := ioutil.ReadFile(opts.PemFilename)
> + contents, err := ioutil.ReadFile(opts.PEMFilename)
> if err != nil {
> return nil, err
> }
> Index: oauth2.go
> diff --git a/oauth2.go b/oauth2.go
> index 8813e22b7ad70d8efc1032e61aff384e2f03386b..
> 6850f3b83f93af35fa5fb3859984fea1e7ca28cb 100644
> --- a/oauth2.go
> +++ b/oauth2.go
> @@ -61,8 +61,8 @@ type Options struct {
> // granting (or denying) access.
> RedirectURL string `json:"redirect_url"`
>
> - // Optional, identifies the level of access being requested.
> - Scopes []string `json:"scopes"`
> + // Scopes optionally specifies a list of requested permission
> scopes.
> + Scopes []string `json:"scopes,omitempty"`
>
> // AccessType is an OAuth extension that gets sent as the
> // "access_type" field in the URL from AuthCodeURL.
>
>
>
Sign in to reply to this message.
jbd
Submitted as b2a1756f9852171510e06ac5727cbb4b6faae471.
11 years, 5 months ago (2014年08月13日 21:06:57 UTC) #3
Submitted as b2a1756f9852171510e06ac5727cbb4b6faae471.
Sign in to reply to this message.
|
Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /