Skip to content

Commit fc4c9e2

Browse files
committed
Upgrade to oauth2.v4
1 parent 4244ef0 commit fc4c9e2

26 files changed

+71
-71
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: go
22
sudo: false
3-
go_import_path: gopkg.in/oauth2.v3
3+
go_import_path: gopkg.in/oauth2.v4
44
go:
55
- 1.9
66
before_install:

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
### Download and install
3232

3333
``` bash
34-
go get -u -v gopkg.in/oauth2.v3/...
34+
go get -u -v gopkg.in/oauth2.v4/...
3535
```
3636

3737
### Create file `server.go`
@@ -43,11 +43,11 @@ import (
4343
"log"
4444
"net/http"
4545

46-
"gopkg.in/oauth2.v3/errors"
47-
"gopkg.in/oauth2.v3/manage"
48-
"gopkg.in/oauth2.v3/models"
49-
"gopkg.in/oauth2.v3/server"
50-
"gopkg.in/oauth2.v3/store"
46+
"gopkg.in/oauth2.v4/errors"
47+
"gopkg.in/oauth2.v4/manage"
48+
"gopkg.in/oauth2.v4/models"
49+
"gopkg.in/oauth2.v4/server"
50+
"gopkg.in/oauth2.v4/store"
5151
)
5252

5353
func main() {
@@ -135,7 +135,7 @@ Simulation examples of authorization code model, please check [example](/example
135135
```go
136136

137137
import (
138-
"gopkg.in/oauth2.v3/generates"
138+
"gopkg.in/oauth2.v4/generates"
139139
"github.com/dgrijalva/jwt-go"
140140
)
141141

@@ -180,9 +180,9 @@ if !ok || !token.Valid {
180180
[Build-Status-Image]: https://travis-ci.org/go-oauth2/oauth2.svg?branch=master
181181
[codecov-url]: https://codecov.io/gh/go-oauth2/oauth2
182182
[codecov-image]: https://codecov.io/gh/go-oauth2/oauth2/branch/master/graph/badge.svg
183-
[reportcard-url]: https://goreportcard.com/report/gopkg.in/oauth2.v3
184-
[reportcard-image]: https://goreportcard.com/badge/gopkg.in/oauth2.v3
185-
[godoc-url]: https://godoc.org/gopkg.in/oauth2.v3
186-
[godoc-image]: https://godoc.org/gopkg.in/oauth2.v3?status.svg
183+
[reportcard-url]: https://goreportcard.com/report/gopkg.in/oauth2.v4
184+
[reportcard-image]: https://goreportcard.com/badge/gopkg.in/oauth2.v4
185+
[godoc-url]: https://godoc.org/gopkg.in/oauth2.v4
186+
[godoc-image]: https://godoc.org/gopkg.in/oauth2.v4?status.svg
187187
[license-url]: http://opensource.org/licenses/MIT
188188
[license-image]: https://img.shields.io/npm/l/express.svg

doc.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
// package main
44
// import (
55
// "net/http"
6-
// "gopkg.in/oauth2.v3/manage"
7-
// "gopkg.in/oauth2.v3/server"
8-
// "gopkg.in/oauth2.v3/store"
6+
// "gopkg.in/oauth2.v4/manage"
7+
// "gopkg.in/oauth2.v4/server"
8+
// "gopkg.in/oauth2.v4/store"
99
// )
1010
// func main() {
1111
// manager := manage.NewDefaultManager()

example/client/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,6 @@ func main() {
127127
e.Encode(token)
128128
})
129129

130-
log.Println("Client is running at 9094 port.")
130+
log.Println("Client is running at 9094 port.Please open http://localhost:9094")
131131
log.Fatal(http.ListenAndServe(":9094", nil))
132132
}

example/server/server.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import (
1010

1111
"github.com/dgrijalva/jwt-go"
1212
"github.com/go-session/session"
13-
"gopkg.in/oauth2.v3/errors"
14-
"gopkg.in/oauth2.v3/generates"
15-
"gopkg.in/oauth2.v3/manage"
16-
"gopkg.in/oauth2.v3/models"
17-
"gopkg.in/oauth2.v3/server"
18-
"gopkg.in/oauth2.v3/store"
13+
"gopkg.in/oauth2.v4/errors"
14+
"gopkg.in/oauth2.v4/generates"
15+
"gopkg.in/oauth2.v4/manage"
16+
"gopkg.in/oauth2.v4/models"
17+
"gopkg.in/oauth2.v4/server"
18+
"gopkg.in/oauth2.v4/store"
1919
)
2020

2121
func main() {

generates/access.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"strconv"
88
"strings"
99

10-
"gopkg.in/oauth2.v3"
11-
"gopkg.in/oauth2.v3/utils/uuid"
10+
"gopkg.in/oauth2.v4"
11+
"gopkg.in/oauth2.v4/utils/uuid"
1212
)
1313

1414
// NewAccessGenerate create to generate the access token instance

generates/access_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"testing"
66
"time"
77

8-
"gopkg.in/oauth2.v3"
9-
"gopkg.in/oauth2.v3/generates"
10-
"gopkg.in/oauth2.v3/models"
8+
"gopkg.in/oauth2.v4"
9+
"gopkg.in/oauth2.v4/generates"
10+
"gopkg.in/oauth2.v4/models"
1111

1212
. "github.com/smartystreets/goconvey/convey"
1313
)

generates/authorize.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"encoding/base64"
77
"strings"
88

9-
"gopkg.in/oauth2.v3"
10-
"gopkg.in/oauth2.v3/utils/uuid"
9+
"gopkg.in/oauth2.v4"
10+
"gopkg.in/oauth2.v4/utils/uuid"
1111
)
1212

1313
// NewAuthorizeGenerate create to generate the authorize code instance

generates/authorize_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"testing"
66
"time"
77

8-
"gopkg.in/oauth2.v3"
9-
"gopkg.in/oauth2.v3/generates"
10-
"gopkg.in/oauth2.v3/models"
8+
"gopkg.in/oauth2.v4"
9+
"gopkg.in/oauth2.v4/generates"
10+
"gopkg.in/oauth2.v4/models"
1111

1212
. "github.com/smartystreets/goconvey/convey"
1313
)

generates/jwt_access.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
errs "errors"
1010

1111
"github.com/dgrijalva/jwt-go"
12-
"gopkg.in/oauth2.v3"
13-
"gopkg.in/oauth2.v3/errors"
14-
"gopkg.in/oauth2.v3/utils/uuid"
12+
"gopkg.in/oauth2.v4"
13+
"gopkg.in/oauth2.v4/errors"
14+
"gopkg.in/oauth2.v4/utils/uuid"
1515
)
1616

1717
// JWTAccessClaims jwt claims

0 commit comments

Comments
 (0)