Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions client_store.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package mysql

import (
"context"
"database/sql"
"fmt"
"time"

"github.com/go-oauth2/oauth2/v4"
"github.com/go-oauth2/oauth2/v4/models"
"github.com/jmoiron/sqlx"
jsoniter "github.com/json-iterator/go"
"gopkg.in/oauth2.v3"
"gopkg.in/oauth2.v3/models"
)

type ClientStore struct {
Expand Down Expand Up @@ -90,7 +91,7 @@ func (s *ClientStore) toClientInfo(data string) (oauth2.ClientInfo, error) {
}

// GetByID retrieves and returns client information by id
func (s *ClientStore) GetByID(id string) (oauth2.ClientInfo, error) {
func (s *ClientStore) GetByID(ctx context.Context, id string) (oauth2.ClientInfo, error) {
if id == "" {
return nil, nil
}
Expand Down
32 changes: 28 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,38 @@
module github.com/imrenagi/go-oauth2-mysql

go 1.12
go 1.23.0

require (
github.com/go-sql-driver/mysql v1.4.0
github.com/jmoiron/sqlx v1.2.0
github.com/json-iterator/go v1.1.6
github.com/stretchr/testify v1.6.1
github.com/vgarvardt/go-pg-adapter v0.3.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-oauth2/oauth2/v4 v4.5.2 // indirect
github.com/go-session/session v3.1.2+incompatible // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/stretchr/testify v1.3.0
github.com/vgarvardt/go-pg-adapter v0.3.0
gopkg.in/oauth2.v3 v3.10.0
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/tidwall/btree v1.7.0 // indirect
github.com/tidwall/buntdb v1.3.1 // indirect
github.com/tidwall/gjson v1.17.3 // indirect
github.com/tidwall/grect v0.1.4 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tidwall/rtred v0.1.2 // indirect
github.com/tidwall/rtree v1.10.0 // indirect
github.com/tidwall/tinyqueue v0.1.1 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/oauth2 v0.22.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
)
Loading