Skip to content

Commit

Permalink
Merge pull request #16 from vgarvardt/patch/go-mod-oauth2-pkg
Browse files Browse the repository at this point in the history
Updated package to use go-mod compatible oauth2
  • Loading branch information
vgarvardt authored Jul 3, 2020
2 parents ecaf9b1 + 89f7bd0 commit 943d1f3
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 16 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 9 * * 1'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: go

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Storage major version matches [OAuth 2.0](https://github.com/go-oauth2/oauth2) major version,
so use corresponding version (go modules compliant)

For `gopkg.in/oauth2.v4`:
For `github.com/go-oauth2/oauth2/v4`:

```bash
$ go get -u github.com/vgarvardt/go-oauth2-pg/v4
Expand All @@ -33,10 +33,10 @@ import (
"os"
"time"

"github.com/go-oauth2/oauth2/v4/manage"
"github.com/jackc/pgx/v4"
pg "github.com/vgarvardt/go-oauth2-pg/v4"
"github.com/vgarvardt/go-pg-adapter/pgx4adapter"
"gopkg.in/oauth2.v4/manage"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions client_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"log"
"os"

"gopkg.in/oauth2.v4"
"gopkg.in/oauth2.v4/models"
"github.com/go-oauth2/oauth2/v4"
"github.com/go-oauth2/oauth2/v4/models"

pgAdapter "github.com/vgarvardt/go-pg-adapter"
)
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module github.com/vgarvardt/go-oauth2-pg/v4
go 1.14

require (
github.com/jackc/pgx/v4 v4.6.0
github.com/go-oauth2/oauth2/v4 v4.1.0
github.com/jackc/pgx/v4 v4.7.1
github.com/jmoiron/sqlx v1.2.0
github.com/stretchr/testify v1.6.1
github.com/vgarvardt/go-pg-adapter v1.0.0
gopkg.in/oauth2.v4 v4.0.0
)
54 changes: 47 additions & 7 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions token_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"os"
"time"

"gopkg.in/oauth2.v4"
"gopkg.in/oauth2.v4/models"
"github.com/go-oauth2/oauth2/v4"
"github.com/go-oauth2/oauth2/v4/models"

pgAdapter "github.com/vgarvardt/go-pg-adapter"
)
Expand Down
2 changes: 1 addition & 1 deletion token_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import (
"testing"
"time"

"github.com/go-oauth2/oauth2/v4/models"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/pgxpool"
_ "github.com/jackc/pgx/v4/stdlib"
"github.com/jmoiron/sqlx"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"gopkg.in/oauth2.v4/models"

pgAdapter "github.com/vgarvardt/go-pg-adapter"
"github.com/vgarvardt/go-pg-adapter/pgx4adapter"
Expand Down

0 comments on commit 943d1f3

Please sign in to comment.