update go module version to v2
This commit is contained in:
parent
33a38e9c07
commit
7dd0ea5780
59 changed files with 116 additions and 113 deletions
|
@ -12,8 +12,8 @@ import (
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/client/rs"
|
"github.com/caos/oidc/v2/pkg/client/rs"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -11,9 +11,9 @@ import (
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/client/rp"
|
"github.com/caos/oidc/v2/pkg/client/rp"
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -10,9 +10,9 @@ import (
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
githubOAuth "golang.org/x/oauth2/github"
|
githubOAuth "golang.org/x/oauth2/github"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/client/rp"
|
"github.com/caos/oidc/v2/pkg/client/rp"
|
||||||
"github.com/caos/oidc/pkg/client/rp/cli"
|
"github.com/caos/oidc/v2/pkg/client/rp/cli"
|
||||||
"github.com/caos/oidc/pkg/http"
|
"github.com/caos/oidc/v2/pkg/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -13,7 +13,7 @@ import (
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/client/profile"
|
"github.com/caos/oidc/v2/pkg/client/profile"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/op"
|
"github.com/caos/oidc/v2/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -10,8 +10,8 @@ import (
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"golang.org/x/text/language"
|
"golang.org/x/text/language"
|
||||||
|
|
||||||
"github.com/caos/oidc/example/server/internal"
|
"github.com/caos/oidc/v2/example/server/internal"
|
||||||
"github.com/caos/oidc/pkg/op"
|
"github.com/caos/oidc/v2/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -3,8 +3,8 @@ package internal
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
"github.com/caos/oidc/pkg/op"
|
"github.com/caos/oidc/v2/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -5,9 +5,8 @@ import (
|
||||||
|
|
||||||
"golang.org/x/text/language"
|
"golang.org/x/text/language"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/op"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
|
"github.com/caos/oidc/v2/pkg/op"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -13,8 +13,8 @@ import (
|
||||||
"golang.org/x/text/language"
|
"golang.org/x/text/language"
|
||||||
"gopkg.in/square/go-jose.v2"
|
"gopkg.in/square/go-jose.v2"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
"github.com/caos/oidc/pkg/op"
|
"github.com/caos/oidc/v2/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
|
|
||||||
"gopkg.in/square/go-jose.v2"
|
"gopkg.in/square/go-jose.v2"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
"github.com/caos/oidc/pkg/op"
|
"github.com/caos/oidc/v2/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
type multiStorage struct {
|
type multiStorage struct {
|
||||||
|
|
|
@ -10,8 +10,8 @@ import (
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"golang.org/x/text/language"
|
"golang.org/x/text/language"
|
||||||
|
|
||||||
"github.com/caos/oidc/example/server/internal"
|
"github.com/caos/oidc/v2/example/server/internal"
|
||||||
"github.com/caos/oidc/pkg/op"
|
"github.com/caos/oidc/v2/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
||||||
module github.com/caos/oidc
|
module github.com/caos/oidc/v2
|
||||||
|
|
||||||
go 1.15
|
go 1.15
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,9 @@ import (
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
"gopkg.in/square/go-jose.v2"
|
"gopkg.in/square/go-jose.v2"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/crypto"
|
"github.com/caos/oidc/v2/pkg/crypto"
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
|
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/http"
|
"github.com/caos/oidc/v2/pkg/http"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
//JWTProfileExchange handles the oauth2 jwt profile exchange
|
//JWTProfileExchange handles the oauth2 jwt profile exchange
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
"gopkg.in/square/go-jose.v2"
|
"gopkg.in/square/go-jose.v2"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/client"
|
"github.com/caos/oidc/v2/pkg/client"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
//jwtProfileTokenSource implement the oauth2.TokenSource
|
//jwtProfileTokenSource implement the oauth2.TokenSource
|
||||||
|
|
|
@ -4,9 +4,9 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/client/rp"
|
"github.com/caos/oidc/v2/pkg/client/rp"
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package rp
|
package rp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/caos/oidc/pkg/oidc/grants/tokenexchange"
|
"github.com/caos/oidc/v2/pkg/oidc/grants/tokenexchange"
|
||||||
)
|
)
|
||||||
|
|
||||||
//DelegationTokenRequest is an implementation of TokenExchangeRequest
|
//DelegationTokenRequest is an implementation of TokenExchangeRequest
|
||||||
|
|
|
@ -9,8 +9,8 @@ import (
|
||||||
|
|
||||||
"gopkg.in/square/go-jose.v2"
|
"gopkg.in/square/go-jose.v2"
|
||||||
|
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewRemoteKeySet(client *http.Client, jwksURL string, opts ...func(*remoteKeySet)) oidc.KeySet {
|
func NewRemoteKeySet(client *http.Client, jwksURL string, opts ...func(*remoteKeySet)) oidc.KeySet {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
|
|
||||||
"github.com/golang/mock/gomock"
|
"github.com/golang/mock/gomock"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockVerifier is a mock of Verifier interface
|
// MockVerifier is a mock of Verifier interface
|
||||||
|
|
|
@ -12,9 +12,9 @@ import (
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
"gopkg.in/square/go-jose.v2"
|
"gopkg.in/square/go-jose.v2"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/client"
|
"github.com/caos/oidc/v2/pkg/client"
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
|
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/oidc/grants/tokenexchange"
|
"github.com/caos/oidc/v2/pkg/oidc/grants/tokenexchange"
|
||||||
)
|
)
|
||||||
|
|
||||||
//TokenExchangeRP extends the `RelyingParty` interface for the *draft* oauth2 `Token Exchange`
|
//TokenExchangeRP extends the `RelyingParty` interface for the *draft* oauth2 `Token Exchange`
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
"gopkg.in/square/go-jose.v2"
|
"gopkg.in/square/go-jose.v2"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type IDTokenVerifier interface {
|
type IDTokenVerifier interface {
|
||||||
|
|
|
@ -6,9 +6,9 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/client"
|
"github.com/caos/oidc/v2/pkg/client"
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ResourceServer interface {
|
type ResourceServer interface {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package oidc
|
||||||
import (
|
import (
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/crypto"
|
"github.com/caos/oidc/v2/pkg/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -9,8 +9,8 @@ import (
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
"gopkg.in/square/go-jose.v2"
|
"gopkg.in/square/go-jose.v2"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/crypto"
|
"github.com/caos/oidc/v2/pkg/crypto"
|
||||||
"github.com/caos/oidc/pkg/http"
|
"github.com/caos/oidc/v2/pkg/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
|
|
||||||
"gopkg.in/square/go-jose.v2"
|
"gopkg.in/square/go-jose.v2"
|
||||||
|
|
||||||
str "github.com/caos/oidc/pkg/strings"
|
str "github.com/caos/oidc/v2/pkg/strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Claims interface {
|
type Claims interface {
|
||||||
|
|
|
@ -10,9 +10,9 @@ import (
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
str "github.com/caos/oidc/pkg/strings"
|
str "github.com/caos/oidc/v2/pkg/strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AuthRequest interface {
|
type AuthRequest interface {
|
||||||
|
|
|
@ -13,10 +13,10 @@ import (
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
"github.com/caos/oidc/pkg/op"
|
"github.com/caos/oidc/v2/pkg/op"
|
||||||
"github.com/caos/oidc/pkg/op/mock"
|
"github.com/caos/oidc/v2/pkg/op/mock"
|
||||||
)
|
)
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -3,7 +3,7 @@ package op
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package op
|
package op
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/caos/oidc/pkg/crypto"
|
"github.com/caos/oidc/v2/pkg/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Crypto interface {
|
type Crypto interface {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
|
|
||||||
"gopkg.in/square/go-jose.v2"
|
"gopkg.in/square/go-jose.v2"
|
||||||
|
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DiscoverStorage interface {
|
type DiscoverStorage interface {
|
||||||
|
|
|
@ -11,9 +11,9 @@ import (
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"gopkg.in/square/go-jose.v2"
|
"gopkg.in/square/go-jose.v2"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
"github.com/caos/oidc/pkg/op"
|
"github.com/caos/oidc/v2/pkg/op"
|
||||||
"github.com/caos/oidc/pkg/op/mock"
|
"github.com/caos/oidc/v2/pkg/op/mock"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDiscover(t *testing.T) {
|
func TestDiscover(t *testing.T) {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package op_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/op"
|
"github.com/caos/oidc/v2/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestEndpoint_Path(t *testing.T) {
|
func TestEndpoint_Path(t *testing.T) {
|
||||||
|
|
|
@ -3,8 +3,8 @@ package op
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ErrAuthRequest interface {
|
type ErrAuthRequest interface {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
"gopkg.in/square/go-jose.v2"
|
"gopkg.in/square/go-jose.v2"
|
||||||
|
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
type KeyProvider interface {
|
type KeyProvider interface {
|
||||||
|
|
|
@ -11,9 +11,9 @@ import (
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"gopkg.in/square/go-jose.v2"
|
"gopkg.in/square/go-jose.v2"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
"github.com/caos/oidc/pkg/op"
|
"github.com/caos/oidc/v2/pkg/op"
|
||||||
"github.com/caos/oidc/pkg/op/mock"
|
"github.com/caos/oidc/v2/pkg/op/mock"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestKeys(t *testing.T) {
|
func TestKeys(t *testing.T) {
|
||||||
|
|
|
@ -8,9 +8,10 @@ import (
|
||||||
context "context"
|
context "context"
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
|
|
||||||
http "github.com/caos/oidc/pkg/http"
|
|
||||||
op "github.com/caos/oidc/pkg/op"
|
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
|
|
||||||
|
http "github.com/caos/oidc/v2/pkg/http"
|
||||||
|
op "github.com/caos/oidc/v2/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockAuthorizer is a mock of Authorizer interface.
|
// MockAuthorizer is a mock of Authorizer interface.
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
"github.com/gorilla/schema"
|
"github.com/gorilla/schema"
|
||||||
"gopkg.in/square/go-jose.v2"
|
"gopkg.in/square/go-jose.v2"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
"github.com/caos/oidc/pkg/op"
|
"github.com/caos/oidc/v2/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewAuthorizer(t *testing.T) op.Authorizer {
|
func NewAuthorizer(t *testing.T) op.Authorizer {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
|
|
||||||
"github.com/golang/mock/gomock"
|
"github.com/golang/mock/gomock"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
"github.com/caos/oidc/pkg/op"
|
"github.com/caos/oidc/v2/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewClient(t *testing.T) op.Client {
|
func NewClient(t *testing.T) op.Client {
|
||||||
|
|
|
@ -8,9 +8,10 @@ import (
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
time "time"
|
time "time"
|
||||||
|
|
||||||
oidc "github.com/caos/oidc/pkg/oidc"
|
|
||||||
op "github.com/caos/oidc/pkg/op"
|
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
|
|
||||||
|
oidc "github.com/caos/oidc/v2/pkg/oidc"
|
||||||
|
op "github.com/caos/oidc/v2/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockClient is a mock of Client interface.
|
// MockClient is a mock of Client interface.
|
||||||
|
|
|
@ -8,9 +8,10 @@ import (
|
||||||
http "net/http"
|
http "net/http"
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
|
|
||||||
op "github.com/caos/oidc/pkg/op"
|
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
language "golang.org/x/text/language"
|
language "golang.org/x/text/language"
|
||||||
|
|
||||||
|
op "github.com/caos/oidc/v2/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockConfiguration is a mock of Configuration interface.
|
// MockConfiguration is a mock of Configuration interface.
|
||||||
|
|
|
@ -8,8 +8,9 @@ import (
|
||||||
context "context"
|
context "context"
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
|
|
||||||
op "github.com/caos/oidc/pkg/op"
|
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
|
|
||||||
|
op "github.com/caos/oidc/v2/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockKeyProvider is a mock of KeyProvider interface.
|
// MockKeyProvider is a mock of KeyProvider interface.
|
||||||
|
|
|
@ -9,10 +9,11 @@ import (
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
time "time"
|
time "time"
|
||||||
|
|
||||||
oidc "github.com/caos/oidc/pkg/oidc"
|
|
||||||
op "github.com/caos/oidc/pkg/op"
|
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
jose "gopkg.in/square/go-jose.v2"
|
jose "gopkg.in/square/go-jose.v2"
|
||||||
|
|
||||||
|
oidc "github.com/caos/oidc/v2/pkg/oidc"
|
||||||
|
op "github.com/caos/oidc/v2/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockStorage is a mock of Storage interface.
|
// MockStorage is a mock of Storage interface.
|
||||||
|
|
|
@ -6,11 +6,10 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
|
||||||
|
|
||||||
"github.com/golang/mock/gomock"
|
"github.com/golang/mock/gomock"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/op"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
|
"github.com/caos/oidc/v2/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewStorage(t *testing.T) op.Storage {
|
func NewStorage(t *testing.T) op.Storage {
|
||||||
|
|
|
@ -12,8 +12,8 @@ import (
|
||||||
"golang.org/x/text/language"
|
"golang.org/x/text/language"
|
||||||
"gopkg.in/square/go-jose.v2"
|
"gopkg.in/square/go-jose.v2"
|
||||||
|
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ProbesFn func(context.Context) error
|
type ProbesFn func(context.Context) error
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SessionEnder interface {
|
type SessionEnder interface {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
"gopkg.in/square/go-jose.v2"
|
"gopkg.in/square/go-jose.v2"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AuthStorage interface {
|
type AuthStorage interface {
|
||||||
|
|
|
@ -4,9 +4,9 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/crypto"
|
"github.com/caos/oidc/v2/pkg/crypto"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
"github.com/caos/oidc/pkg/strings"
|
"github.com/caos/oidc/v2/pkg/strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TokenCreator interface {
|
type TokenCreator interface {
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
//CodeExchange handles the OAuth 2.0 authorization_code grant, including
|
//CodeExchange handles the OAuth 2.0 authorization_code grant, including
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Introspector interface {
|
type Introspector interface {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type JWTAuthorizationGrantExchanger interface {
|
type JWTAuthorizationGrantExchanger interface {
|
||||||
|
|
|
@ -6,9 +6,9 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
"github.com/caos/oidc/pkg/strings"
|
"github.com/caos/oidc/v2/pkg/strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RefreshTokenRequest interface {
|
type RefreshTokenRequest interface {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Exchanger interface {
|
type Exchanger interface {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Revoker interface {
|
type Revoker interface {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
httphelper "github.com/caos/oidc/pkg/http"
|
httphelper "github.com/caos/oidc/v2/pkg/http"
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UserinfoProvider interface {
|
type UserinfoProvider interface {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AccessTokenVerifier interface {
|
type AccessTokenVerifier interface {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type IDTokenHintVerifier interface {
|
type IDTokenHintVerifier interface {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
|
|
||||||
"gopkg.in/square/go-jose.v2"
|
"gopkg.in/square/go-jose.v2"
|
||||||
|
|
||||||
"github.com/caos/oidc/pkg/oidc"
|
"github.com/caos/oidc/v2/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type JWTProfileVerifier interface {
|
type JWTProfileVerifier interface {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue