Skip to content

Commit

Permalink
edit path
Browse files Browse the repository at this point in the history
  • Loading branch information
LarryTang committed Sep 10, 2019
1 parent 0f29369 commit 1f68faa
Show file tree
Hide file tree
Showing 54 changed files with 101 additions and 101 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ go:
install:
- export GOPATH="$HOME/gopath"
- mkdir -p "$GOPATH/src/golang.org/x"
- mv "$TRAVIS_BUILD_DIR" "$GOPATH/src/golang.org/x/oauth2"
- go get -v -t -d golang.org/x/oauth2/...
- mv "$TRAVIS_BUILD_DIR" "$GOPATH/src/github.com/fever365/oauth2"
- go get -v -t -d github.com/fever365/oauth2/...

script:
- go test -v golang.org/x/oauth2/...
- go test -v github.com/fever365/oauth2/...
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# OAuth2 for Go

[![Build Status](https://travis-ci.org/golang/oauth2.svg?branch=master)](https://travis-ci.org/golang/oauth2)
[![GoDoc](https://godoc.org/golang.org/x/oauth2?status.svg)](https://godoc.org/golang.org/x/oauth2)
[![GoDoc](https://godoc.org/github.com/fever365/oauth2?status.svg)](https://godoc.org/github.com/fever365/oauth2)

oauth2 package contains a client implementation for OAuth 2.0 spec.

## Installation

~~~~
go get golang.org/x/oauth2
go get github.com/fever365/oauth2
~~~~

Or you can manually git clone the repository to
`$(go env GOPATH)/src/golang.org/x/oauth2`.
`$(go env GOPATH)/src/github.com/fever365/oauth2`.

See godoc for further documentation and examples.

* [godoc.org/golang.org/x/oauth2](http://godoc.org/golang.org/x/oauth2)
* [godoc.org/golang.org/x/oauth2/google](http://godoc.org/golang.org/x/oauth2/google)
* [godoc.org/github.com/fever365/oauth2](http://godoc.org/github.com/fever365/oauth2)
* [godoc.org/github.com/fever365/oauth2/google](http://godoc.org/github.com/fever365/oauth2/google)

## Policy for new packages

Expand Down
2 changes: 1 addition & 1 deletion amazon/amazon.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
package amazon

import (
"golang.org/x/oauth2"
"github.com/fever365/oauth2"
)

// Endpoint is Amazon's OAuth 2.0 endpoint.
Expand Down
2 changes: 1 addition & 1 deletion bitbucket/bitbucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
package bitbucket

import (
"golang.org/x/oauth2"
"github.com/fever365/oauth2"
)

// Endpoint is Bitbucket's OAuth 2.0 endpoint.
Expand Down
4 changes: 2 additions & 2 deletions cern/cern.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// license that can be found in the LICENSE file.

// Package cern provides constants for using OAuth2 to access CERN services.
package cern // import "golang.org/x/oauth2/cern"
package cern // import "github.com/fever365/oauth2/cern"

import (
"golang.org/x/oauth2"
"github.com/fever365/oauth2"
)

// Endpoint is CERN's OAuth 2.0 endpoint.
Expand Down
6 changes: 3 additions & 3 deletions clientcredentials/clientcredentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// server.
//
// See https://tools.ietf.org/html/rfc6749#section-4.4
package clientcredentials // import "golang.org/x/oauth2/clientcredentials"
package clientcredentials // import "github.com/fever365/oauth2/clientcredentials"

import (
"context"
Expand All @@ -20,8 +20,8 @@ import (
"net/url"
"strings"

"golang.org/x/oauth2"
"golang.org/x/oauth2/internal"
"github.com/fever365/oauth2"
"github.com/fever365/oauth2/internal"
)

// Config describes a 2-legged OAuth2 flow, with both the
Expand Down
2 changes: 1 addition & 1 deletion clientcredentials/clientcredentials_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"net/url"
"testing"

"golang.org/x/oauth2/internal"
"github.com/fever365/oauth2/internal"
)

func newConf(serverURL string) *Config {
Expand Down
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"net/http"
"time"

"golang.org/x/oauth2"
"github.com/fever365/oauth2"
)

func ExampleConfig() {
Expand Down
4 changes: 2 additions & 2 deletions facebook/facebook.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// license that can be found in the LICENSE file.

// Package facebook provides constants for using OAuth2 to access Facebook.
package facebook // import "golang.org/x/oauth2/facebook"
package facebook // import "github.com/fever365/oauth2/facebook"

import (
"golang.org/x/oauth2"
"github.com/fever365/oauth2"
)

// Endpoint is Facebook's OAuth 2.0 endpoint.
Expand Down
4 changes: 2 additions & 2 deletions fitbit/fitbit.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// license that can be found in the LICENSE file.

// Package fitbit provides constants for using OAuth2 to access the Fitbit API.
package fitbit // import "golang.org/x/oauth2/fitbit"
package fitbit // import "github.com/fever365/oauth2/fitbit"

import (
"golang.org/x/oauth2"
"github.com/fever365/oauth2"
)

// Endpoint is the Fitbit API's OAuth 2.0 endpoint.
Expand Down
4 changes: 2 additions & 2 deletions foursquare/foursquare.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// license that can be found in the LICENSE file.

// Package foursquare provides constants for using OAuth2 to access Foursquare.
package foursquare // import "golang.org/x/oauth2/foursquare"
package foursquare // import "github.com/fever365/oauth2/foursquare"

import (
"golang.org/x/oauth2"
"github.com/fever365/oauth2"
)

// Endpoint is Foursquare's OAuth 2.0 endpoint.
Expand Down
4 changes: 2 additions & 2 deletions github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// license that can be found in the LICENSE file.

// Package github provides constants for using OAuth2 to access Github.
package github // import "golang.org/x/oauth2/github"
package github // import "github.com/fever365/oauth2/github"

import (
"golang.org/x/oauth2"
"github.com/fever365/oauth2"
)

// Endpoint is Github's OAuth 2.0 endpoint.
Expand Down
4 changes: 2 additions & 2 deletions gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// license that can be found in the LICENSE file.

// Package gitlab provides constants for using OAuth2 to access GitLab.
package gitlab // import "golang.org/x/oauth2/gitlab"
package gitlab // import "github.com/fever365/oauth2/gitlab"

import (
"golang.org/x/oauth2"
"github.com/fever365/oauth2"
)

// Endpoint is GitLab's OAuth 2.0 endpoint.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module golang.org/x/oauth2
module github.com/fever365/oauth2

go 1.11

Expand Down
2 changes: 1 addition & 1 deletion google/appengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"context"
"time"

"golang.org/x/oauth2"
"github.com/fever365/oauth2"
)

// Set at init time by appengine_gen1.go. If nil, we're not on App Engine standard first generation (<= Go 1.9) or App Engine flexible.
Expand Down
2 changes: 1 addition & 1 deletion google/appengine_gen1.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"strings"
"sync"

"golang.org/x/oauth2"
"github.com/fever365/oauth2"
"google.golang.org/appengine"
)

Expand Down
2 changes: 1 addition & 1 deletion google/appengine_gen2_flex.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"log"
"sync"

"golang.org/x/oauth2"
"github.com/fever365/oauth2"
)

var logOnce sync.Once // only spam about deprecation once
Expand Down
2 changes: 1 addition & 1 deletion google/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"runtime"

"cloud.google.com/go/compute/metadata"
"golang.org/x/oauth2"
"github.com/fever365/oauth2"
)

// Credentials holds Google credentials, including "Application Default Credentials".
Expand Down
4 changes: 2 additions & 2 deletions google/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//
// OAuth2 Configs
//
// Two functions in this package return golang.org/x/oauth2.Config values from Google credential
// Two functions in this package return github.com/fever365/oauth2.Config values from Google credential
// data. Google supports two JSON formats for OAuth2 credentials: one is handled by ConfigFromJSON,
// the other by JWTConfigFromJSON. The returned Config can be used to obtain a TokenSource or
// create an http.Client.
Expand All @@ -37,4 +37,4 @@
// same as the one obtained from the oauth2.Config returned from ConfigFromJSON or
// JWTConfigFromJSON, but the Credentials may contain additional information
// that is useful is some circumstances.
package google // import "golang.org/x/oauth2/google"
package google // import "github.com/fever365/oauth2/google"
6 changes: 3 additions & 3 deletions google/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"log"
"net/http"

"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
"golang.org/x/oauth2/jwt"
"github.com/fever365/oauth2"
"github.com/fever365/oauth2/google"
"github.com/fever365/oauth2/jwt"
)

func ExampleDefaultClient() {
Expand Down
4 changes: 2 additions & 2 deletions google/google.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"time"

"cloud.google.com/go/compute/metadata"
"golang.org/x/oauth2"
"golang.org/x/oauth2/jwt"
"github.com/fever365/oauth2"
"github.com/fever365/oauth2/jwt"
)

// Endpoint is Google's OAuth 2.0 endpoint.
Expand Down
6 changes: 3 additions & 3 deletions google/jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"fmt"
"time"

"golang.org/x/oauth2"
"golang.org/x/oauth2/internal"
"golang.org/x/oauth2/jws"
"github.com/fever365/oauth2"
"github.com/fever365/oauth2/internal"
"github.com/fever365/oauth2/jws"
)

// JWTAccessTokenSourceFromJSON uses a Google Developers service account JSON
Expand Down
2 changes: 1 addition & 1 deletion google/jwt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"testing"
"time"

"golang.org/x/oauth2/jws"
"github.com/fever365/oauth2/jws"
)

func TestJWTAccessTokenSourceFromJSON(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion google/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"strings"
"time"

"golang.org/x/oauth2"
"github.com/fever365/oauth2"
)

type sdkCredentials struct {
Expand Down
4 changes: 2 additions & 2 deletions heroku/heroku.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// license that can be found in the LICENSE file.

// Package heroku provides constants for using OAuth2 to access Heroku.
package heroku // import "golang.org/x/oauth2/heroku"
package heroku // import "github.com/fever365/oauth2/heroku"

import (
"golang.org/x/oauth2"
"github.com/fever365/oauth2"
)

// Endpoint is Heroku's OAuth 2.0 endpoint.
Expand Down
6 changes: 3 additions & 3 deletions hipchat/hipchat.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
// license that can be found in the LICENSE file.

// Package hipchat provides constants for using OAuth2 to access HipChat.
package hipchat // import "golang.org/x/oauth2/hipchat"
package hipchat // import "github.com/fever365/oauth2/hipchat"

import (
"encoding/json"
"errors"

"golang.org/x/oauth2"
"golang.org/x/oauth2/clientcredentials"
"github.com/fever365/oauth2"
"github.com/fever365/oauth2/clientcredentials"
)

// Endpoint is HipChat's OAuth 2.0 endpoint.
Expand Down
4 changes: 2 additions & 2 deletions instagram/instagram.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// license that can be found in the LICENSE file.

// Package instagram provides constants for using OAuth2 to access Instagram.
package instagram // import "golang.org/x/oauth2/instagram"
package instagram // import "github.com/fever365/oauth2/instagram"

import (
"golang.org/x/oauth2"
"github.com/fever365/oauth2"
)

// Endpoint is Instagram's OAuth 2.0 endpoint.
Expand Down
2 changes: 1 addition & 1 deletion internal/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (e *expirationTime) UnmarshalJSON(b []byte) error {
// Endpoint.AuthStyle.
func RegisterBrokenAuthHeaderProvider(tokenURL string) {}

// AuthStyle is a copy of the golang.org/x/oauth2 package's AuthStyle type.
// AuthStyle is a copy of the github.com/fever365/oauth2 package's AuthStyle type.
type AuthStyle int

const (
Expand Down
2 changes: 1 addition & 1 deletion jira/jira.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"strings"
"time"

"golang.org/x/oauth2"
"github.com/fever365/oauth2"
)

// ClaimSet contains information about the JWT signature according
Expand Down
4 changes: 2 additions & 2 deletions jira/jira_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"strings"
"testing"

"golang.org/x/oauth2"
"golang.org/x/oauth2/jws"
"github.com/fever365/oauth2"
"github.com/fever365/oauth2/jws"
)

func TestJWTFetch_JSONResponse(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions jws/jws.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

// Package jws provides a partial implementation
// of JSON Web Signature encoding and decoding.
// It exists to support the golang.org/x/oauth2 package.
// It exists to support the github.com/fever365/oauth2 package.
//
// See RFC 7515.
//
// Deprecated: this package is not intended for public use and might be
// removed in the future. It exists for internal use only.
// Please switch to another JWS package or copy this package into your own
// source tree.
package jws // import "golang.org/x/oauth2/jws"
package jws // import "github.com/fever365/oauth2/jws"

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion jwt/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package jwt_test
import (
"context"

"golang.org/x/oauth2/jwt"
"github.com/fever365/oauth2/jwt"
)

func ExampleJWTConfig() {
Expand Down
6 changes: 3 additions & 3 deletions jwt/jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"strings"
"time"

"golang.org/x/oauth2"
"golang.org/x/oauth2/internal"
"golang.org/x/oauth2/jws"
"github.com/fever365/oauth2"
"github.com/fever365/oauth2/internal"
"github.com/fever365/oauth2/jws"
)

var (
Expand Down
Loading

0 comments on commit 1f68faa

Please sign in to comment.