replace github url
This commit is contained in:
parent
29d69ca2e0
commit
653b807f5d
98 changed files with 219 additions and 219 deletions
|
@ -13,8 +13,8 @@ import (
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/client/rs"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client/rs"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -14,10 +14,10 @@ import (
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client/rp"
|
||||||
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/zitadel/logging"
|
"github.com/zitadel/logging"
|
||||||
"github.com/zitadel/oidc/v3/pkg/client/rp"
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -45,8 +45,8 @@ import (
|
||||||
|
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/client/rp"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client/rp"
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -10,10 +10,10 @@ import (
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
githubOAuth "golang.org/x/oauth2/github"
|
githubOAuth "golang.org/x/oauth2/github"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/client/rp"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client/rp"
|
||||||
"github.com/zitadel/oidc/v3/pkg/client/rp/cli"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client/rp/cli"
|
||||||
"github.com/zitadel/oidc/v3/pkg/http"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
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/zitadel/oidc/v3/pkg/client/profile"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client/profile"
|
||||||
)
|
)
|
||||||
|
|
||||||
var client = http.DefaultClient
|
var client = http.DefaultClient
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -10,8 +10,8 @@ import (
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
"golang.org/x/text/language"
|
"golang.org/x/text/language"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/example/server/storage"
|
"git.christmann.info/LARA/zitadel-oidc/v3/example/server/storage"
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -8,10 +8,10 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
"github.com/gorilla/securecookie"
|
"github.com/gorilla/securecookie"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type deviceAuthenticate interface {
|
type deviceAuthenticate interface {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type login struct {
|
type login struct {
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
"github.com/zitadel/logging"
|
"github.com/zitadel/logging"
|
||||||
"golang.org/x/text/language"
|
"golang.org/x/text/language"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -6,9 +6,9 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/example/server/config"
|
"git.christmann.info/LARA/zitadel-oidc/v3/example/server/config"
|
||||||
"github.com/zitadel/oidc/v3/example/server/exampleop"
|
"git.christmann.info/LARA/zitadel-oidc/v3/example/server/exampleop"
|
||||||
"github.com/zitadel/oidc/v3/example/server/storage"
|
"git.christmann.info/LARA/zitadel-oidc/v3/example/server/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
func getUserStore(cfg *config.Config) (storage.UserStore, error) {
|
func getUserStore(cfg *config.Config) (storage.UserStore, error) {
|
||||||
|
|
|
@ -3,8 +3,8 @@ package storage
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
|
|
||||||
"golang.org/x/text/language"
|
"golang.org/x/text/language"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -14,8 +14,8 @@ import (
|
||||||
jose "github.com/go-jose/go-jose/v4"
|
jose "github.com/go-jose/go-jose/v4"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
// serviceKey1 is a public key which will be used for the JWT Profile Authorization Grant
|
// serviceKey1 is a public key which will be used for the JWT Profile Authorization Grant
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
|
|
||||||
jose "github.com/go-jose/go-jose/v4"
|
jose "github.com/go-jose/go-jose/v4"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
type multiStorage struct {
|
type multiStorage struct {
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
||||||
module github.com/zitadel/oidc/v3
|
module git.christmann.info/LARA/zitadel-oidc/v3
|
||||||
|
|
||||||
go 1.23.7
|
go 1.23.7
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
tu "github.com/zitadel/oidc/v3/internal/testutil"
|
tu "git.christmann.info/LARA/zitadel-oidc/v3/internal/testutil"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
var custom = map[string]any{
|
var custom = map[string]any{
|
||||||
|
|
|
@ -8,9 +8,9 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
jose "github.com/go-jose/go-jose/v4"
|
jose "github.com/go-jose/go-jose/v4"
|
||||||
"github.com/muhlemmer/gu"
|
"github.com/muhlemmer/gu"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// KeySet implements oidc.Keys
|
// KeySet implements oidc.Keys
|
||||||
|
|
|
@ -15,9 +15,9 @@ import (
|
||||||
"go.opentelemetry.io/otel"
|
"go.opentelemetry.io/otel"
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/crypto"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/crypto"
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -5,9 +5,9 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDiscover(t *testing.T) {
|
func TestDiscover(t *testing.T) {
|
||||||
|
|
|
@ -23,14 +23,14 @@ import (
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/example/server/exampleop"
|
"git.christmann.info/LARA/zitadel-oidc/v3/example/server/exampleop"
|
||||||
"github.com/zitadel/oidc/v3/example/server/storage"
|
"git.christmann.info/LARA/zitadel-oidc/v3/example/server/storage"
|
||||||
"github.com/zitadel/oidc/v3/pkg/client/rp"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client/rp"
|
||||||
"github.com/zitadel/oidc/v3/pkg/client/rs"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client/rs"
|
||||||
"github.com/zitadel/oidc/v3/pkg/client/tokenexchange"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client/tokenexchange"
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
var Logger = slog.New(
|
var Logger = slog.New(
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
|
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/http"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
// JWTProfileExchange handles the oauth2 jwt profile exchange
|
// JWTProfileExchange handles the oauth2 jwt profile exchange
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
jose "github.com/go-jose/go-jose/v4"
|
jose "github.com/go-jose/go-jose/v4"
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/client"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TokenSource interface {
|
type TokenSource interface {
|
||||||
|
|
|
@ -4,9 +4,9 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/client/rp"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client/rp"
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package rp
|
package rp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc/grants/tokenexchange"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc/grants/tokenexchange"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DelegationTokenRequest is an implementation of TokenExchangeRequest
|
// DelegationTokenRequest is an implementation of TokenExchangeRequest
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/client"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newDeviceClientCredentialsRequest(scopes []string, rp RelyingParty) (*oidc.ClientCredentialsRequest, error) {
|
func newDeviceClientCredentialsRequest(scopes []string, rp RelyingParty) (*oidc.ClientCredentialsRequest, error) {
|
||||||
|
|
|
@ -9,9 +9,9 @@ import (
|
||||||
|
|
||||||
jose "github.com/go-jose/go-jose/v4"
|
jose "github.com/go-jose/go-jose/v4"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/client"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client"
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/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 {
|
||||||
|
|
|
@ -14,10 +14,10 @@ import (
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
"golang.org/x/oauth2/clientcredentials"
|
"golang.org/x/oauth2/clientcredentials"
|
||||||
|
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client"
|
||||||
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/zitadel/logging"
|
"github.com/zitadel/logging"
|
||||||
"github.com/zitadel/oidc/v3/pkg/client"
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -5,10 +5,10 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
tu "git.christmann.info/LARA/zitadel-oidc/v3/internal/testutil"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
tu "github.com/zitadel/oidc/v3/internal/testutil"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
|
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc/grants/tokenexchange"
|
"git.christmann.info/LARA/zitadel-oidc/v3/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`
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/client/rp"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client/rp"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UserInfo struct {
|
type UserInfo struct {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
|
|
||||||
jose "github.com/go-jose/go-jose/v4"
|
jose "github.com/go-jose/go-jose/v4"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/client"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
// VerifyTokens implement the Token Response Validation as defined in OIDC specification
|
// VerifyTokens implement the Token Response Validation as defined in OIDC specification
|
||||||
|
|
|
@ -5,11 +5,11 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
tu "git.christmann.info/LARA/zitadel-oidc/v3/internal/testutil"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
jose "github.com/go-jose/go-jose/v4"
|
jose "github.com/go-jose/go-jose/v4"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
tu "github.com/zitadel/oidc/v3/internal/testutil"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestVerifyTokens(t *testing.T) {
|
func TestVerifyTokens(t *testing.T) {
|
||||||
|
|
|
@ -4,9 +4,9 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
tu "github.com/zitadel/oidc/v3/internal/testutil"
|
tu "git.christmann.info/LARA/zitadel-oidc/v3/internal/testutil"
|
||||||
"github.com/zitadel/oidc/v3/pkg/client/rp"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client/rp"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MyCustomClaims extends the TokenClaims base,
|
// MyCustomClaims extends the TokenClaims base,
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/client/rs"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client/rs"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type IntrospectionResponse struct {
|
type IntrospectionResponse struct {
|
||||||
|
|
|
@ -6,9 +6,9 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/client"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client"
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ResourceServer interface {
|
type ResourceServer interface {
|
||||||
|
|
|
@ -4,9 +4,9 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNewResourceServer(t *testing.T) {
|
func TestNewResourceServer(t *testing.T) {
|
||||||
|
|
|
@ -6,10 +6,10 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client"
|
||||||
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/go-jose/go-jose/v4"
|
"github.com/go-jose/go-jose/v4"
|
||||||
"github.com/zitadel/oidc/v3/pkg/client"
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type TokenExchanger interface {
|
type TokenExchanger interface {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"github.com/go-jose/go-jose/v4"
|
"github.com/go-jose/go-jose/v4"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
zcrypto "github.com/zitadel/oidc/v3/pkg/crypto"
|
zcrypto "git.christmann.info/LARA/zitadel-oidc/v3/pkg/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBytesToPrivateKey(t *testing.T) {
|
func TestBytesToPrivateKey(t *testing.T) {
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
var DefaultHTTPClient = &http.Client{
|
var DefaultHTTPClient = &http.Client{
|
||||||
|
|
|
@ -3,7 +3,7 @@ package oidc
|
||||||
import (
|
import (
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/crypto"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
|
|
||||||
"github.com/muhlemmer/gu"
|
"github.com/muhlemmer/gu"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/crypto"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -5,10 +5,10 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
tu "git.christmann.info/LARA/zitadel-oidc/v3/internal/testutil"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
tu "github.com/zitadel/oidc/v3/internal/testutil"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestParseToken(t *testing.T) {
|
func TestParseToken(t *testing.T) {
|
||||||
|
|
|
@ -15,9 +15,9 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/bmatcuk/doublestar/v4"
|
"github.com/bmatcuk/doublestar/v4"
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type AuthRequest interface {
|
type AuthRequest interface {
|
||||||
|
|
|
@ -11,15 +11,15 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/example/server/storage"
|
||||||
|
tu "git.christmann.info/LARA/zitadel-oidc/v3/internal/testutil"
|
||||||
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op/mock"
|
||||||
"github.com/golang/mock/gomock"
|
"github.com/golang/mock/gomock"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"github.com/zitadel/oidc/v3/example/server/storage"
|
|
||||||
tu "github.com/zitadel/oidc/v3/internal/testutil"
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/op/mock"
|
|
||||||
"github.com/zitadel/schema"
|
"github.com/zitadel/schema"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:generate go get github.com/dmarkham/enumer
|
//go:generate go get github.com/dmarkham/enumer
|
||||||
|
|
|
@ -10,13 +10,13 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op/mock"
|
||||||
"github.com/golang/mock/gomock"
|
"github.com/golang/mock/gomock"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/op/mock"
|
|
||||||
"github.com/zitadel/schema"
|
"github.com/zitadel/schema"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package op
|
package op
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/zitadel/oidc/v3/pkg/crypto"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Crypto interface {
|
type Crypto interface {
|
||||||
|
|
|
@ -13,8 +13,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DeviceAuthorizationConfig struct {
|
type DeviceAuthorizationConfig struct {
|
||||||
|
|
|
@ -13,12 +13,12 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/example/server/storage"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
"github.com/muhlemmer/gu"
|
"github.com/muhlemmer/gu"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"github.com/zitadel/oidc/v3/example/server/storage"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_deviceAuthorizationHandler(t *testing.T) {
|
func Test_deviceAuthorizationHandler(t *testing.T) {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
|
|
||||||
jose "github.com/go-jose/go-jose/v4"
|
jose "github.com/go-jose/go-jose/v4"
|
||||||
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DiscoverStorage interface {
|
type DiscoverStorage interface {
|
||||||
|
|
|
@ -11,9 +11,9 @@ import (
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
"github.com/zitadel/oidc/v3/pkg/op/mock"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op/mock"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDiscover(t *testing.T) {
|
func TestDiscover(t *testing.T) {
|
||||||
|
|
|
@ -3,8 +3,8 @@ package op_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestEndpoint_Path(t *testing.T) {
|
func TestEndpoint_Path(t *testing.T) {
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"log/slog"
|
"log/slog"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ErrAuthRequest interface {
|
type ErrAuthRequest interface {
|
||||||
|
|
|
@ -11,9 +11,9 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
"github.com/zitadel/schema"
|
"github.com/zitadel/schema"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
jose "github.com/go-jose/go-jose/v4"
|
jose "github.com/go-jose/go-jose/v4"
|
||||||
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
type KeyProvider interface {
|
type KeyProvider interface {
|
||||||
|
|
|
@ -11,9 +11,9 @@ import (
|
||||||
"github.com/golang/mock/gomock"
|
"github.com/golang/mock/gomock"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
"github.com/zitadel/oidc/v3/pkg/op/mock"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op/mock"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestKeys(t *testing.T) {
|
func TestKeys(t *testing.T) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: github.com/zitadel/oidc/v3/pkg/op (interfaces: Authorizer)
|
// Source: git.christmann.info/LARA/zitadel-oidc/v3/pkg/op (interfaces: Authorizer)
|
||||||
|
|
||||||
// Package mock is a generated GoMock package.
|
// Package mock is a generated GoMock package.
|
||||||
package mock
|
package mock
|
||||||
|
@ -9,9 +9,9 @@ import (
|
||||||
slog "log/slog"
|
slog "log/slog"
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
|
|
||||||
|
http "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
|
op "git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
http "github.com/zitadel/oidc/v3/pkg/http"
|
|
||||||
op "github.com/zitadel/oidc/v3/pkg/op"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockAuthorizer is a mock of Authorizer interface.
|
// MockAuthorizer is a mock of Authorizer interface.
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
"github.com/golang/mock/gomock"
|
"github.com/golang/mock/gomock"
|
||||||
"github.com/zitadel/schema"
|
"github.com/zitadel/schema"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
"git.christmann.info/LARA/zitadel-oidc/v3/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/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewClient(t *testing.T) op.Client {
|
func NewClient(t *testing.T) op.Client {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: github.com/zitadel/oidc/v3/pkg/op (interfaces: Client)
|
// Source: git.christmann.info/LARA/zitadel-oidc/v3/pkg/op (interfaces: Client)
|
||||||
|
|
||||||
// Package mock is a generated GoMock package.
|
// Package mock is a generated GoMock package.
|
||||||
package mock
|
package mock
|
||||||
|
@ -8,9 +8,9 @@ import (
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
time "time"
|
time "time"
|
||||||
|
|
||||||
|
oidc "git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
|
op "git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
oidc "github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
op "github.com/zitadel/oidc/v3/pkg/op"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockClient is a mock of Client interface.
|
// MockClient is a mock of Client interface.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: github.com/zitadel/oidc/v3/pkg/op (interfaces: Configuration)
|
// Source: git.christmann.info/LARA/zitadel-oidc/v3/pkg/op (interfaces: Configuration)
|
||||||
|
|
||||||
// Package mock is a generated GoMock package.
|
// Package mock is a generated GoMock package.
|
||||||
package mock
|
package mock
|
||||||
|
@ -8,8 +8,8 @@ import (
|
||||||
http "net/http"
|
http "net/http"
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
|
|
||||||
|
op "git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
op "github.com/zitadel/oidc/v3/pkg/op"
|
|
||||||
language "golang.org/x/text/language"
|
language "golang.org/x/text/language"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: github.com/zitadel/oidc/v3/pkg/op (interfaces: DiscoverStorage)
|
// Source: git.christmann.info/LARA/zitadel-oidc/v3/pkg/op (interfaces: DiscoverStorage)
|
||||||
|
|
||||||
// Package mock is a generated GoMock package.
|
// Package mock is a generated GoMock package.
|
||||||
package mock
|
package mock
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package mock
|
package mock
|
||||||
|
|
||||||
//go:generate go install github.com/golang/mock/mockgen@v1.6.0
|
//go:generate go install github.com/golang/mock/mockgen@v1.6.0
|
||||||
//go:generate mockgen -package mock -destination ./storage.mock.go github.com/zitadel/oidc/v3/pkg/op Storage
|
//go:generate mockgen -package mock -destination ./storage.mock.go git.christmann.info/LARA/zitadel-oidc/v3/pkg/op Storage
|
||||||
//go:generate mockgen -package mock -destination ./authorizer.mock.go github.com/zitadel/oidc/v3/pkg/op Authorizer
|
//go:generate mockgen -package mock -destination ./authorizer.mock.go git.christmann.info/LARA/zitadel-oidc/v3/pkg/op Authorizer
|
||||||
//go:generate mockgen -package mock -destination ./client.mock.go github.com/zitadel/oidc/v3/pkg/op Client
|
//go:generate mockgen -package mock -destination ./client.mock.go git.christmann.info/LARA/zitadel-oidc/v3/pkg/op Client
|
||||||
//go:generate mockgen -package mock -destination ./glob.mock.go github.com/zitadel/oidc/v3/pkg/op HasRedirectGlobs
|
//go:generate mockgen -package mock -destination ./glob.mock.go git.christmann.info/LARA/zitadel-oidc/v3/pkg/op HasRedirectGlobs
|
||||||
//go:generate mockgen -package mock -destination ./configuration.mock.go github.com/zitadel/oidc/v3/pkg/op Configuration
|
//go:generate mockgen -package mock -destination ./configuration.mock.go git.christmann.info/LARA/zitadel-oidc/v3/pkg/op Configuration
|
||||||
//go:generate mockgen -package mock -destination ./discovery.mock.go github.com/zitadel/oidc/v3/pkg/op DiscoverStorage
|
//go:generate mockgen -package mock -destination ./discovery.mock.go git.christmann.info/LARA/zitadel-oidc/v3/pkg/op DiscoverStorage
|
||||||
//go:generate mockgen -package mock -destination ./signer.mock.go github.com/zitadel/oidc/v3/pkg/op SigningKey,Key
|
//go:generate mockgen -package mock -destination ./signer.mock.go git.christmann.info/LARA/zitadel-oidc/v3/pkg/op SigningKey,Key
|
||||||
//go:generate mockgen -package mock -destination ./key.mock.go github.com/zitadel/oidc/v3/pkg/op KeyProvider
|
//go:generate mockgen -package mock -destination ./key.mock.go git.christmann.info/LARA/zitadel-oidc/v3/pkg/op KeyProvider
|
||||||
|
|
|
@ -3,9 +3,9 @@ package mock
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
|
op "git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
op "github.com/zitadel/oidc/v3/pkg/op"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewHasRedirectGlobs(t *testing.T) op.HasRedirectGlobs {
|
func NewHasRedirectGlobs(t *testing.T) op.HasRedirectGlobs {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: github.com/zitadel/oidc/v3/pkg/op (interfaces: HasRedirectGlobs)
|
// Source: git.christmann.info/LARA/zitadel-oidc/v3/pkg/op (interfaces: HasRedirectGlobs)
|
||||||
|
|
||||||
// Package mock is a generated GoMock package.
|
// Package mock is a generated GoMock package.
|
||||||
package mock
|
package mock
|
||||||
|
@ -8,9 +8,9 @@ import (
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
time "time"
|
time "time"
|
||||||
|
|
||||||
|
oidc "git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
|
op "git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
oidc "github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
op "github.com/zitadel/oidc/v3/pkg/op"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockHasRedirectGlobs is a mock of HasRedirectGlobs interface.
|
// MockHasRedirectGlobs is a mock of HasRedirectGlobs interface.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: github.com/zitadel/oidc/v3/pkg/op (interfaces: KeyProvider)
|
// Source: git.christmann.info/LARA/zitadel-oidc/v3/pkg/op (interfaces: KeyProvider)
|
||||||
|
|
||||||
// Package mock is a generated GoMock package.
|
// Package mock is a generated GoMock package.
|
||||||
package mock
|
package mock
|
||||||
|
@ -8,8 +8,8 @@ import (
|
||||||
context "context"
|
context "context"
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
|
|
||||||
|
op "git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
op "github.com/zitadel/oidc/v3/pkg/op"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockKeyProvider is a mock of KeyProvider interface.
|
// MockKeyProvider is a mock of KeyProvider interface.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: github.com/zitadel/oidc/v3/pkg/op (interfaces: SigningKey,Key)
|
// Source: git.christmann.info/LARA/zitadel-oidc/v3/pkg/op (interfaces: SigningKey,Key)
|
||||||
|
|
||||||
// Package mock is a generated GoMock package.
|
// Package mock is a generated GoMock package.
|
||||||
package mock
|
package mock
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: github.com/zitadel/oidc/v3/pkg/op (interfaces: Storage)
|
// Source: git.christmann.info/LARA/zitadel-oidc/v3/pkg/op (interfaces: Storage)
|
||||||
|
|
||||||
// Package mock is a generated GoMock package.
|
// Package mock is a generated GoMock package.
|
||||||
package mock
|
package mock
|
||||||
|
@ -9,10 +9,10 @@ import (
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
time "time"
|
time "time"
|
||||||
|
|
||||||
|
oidc "git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
|
op "git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
jose "github.com/go-jose/go-jose/v4"
|
jose "github.com/go-jose/go-jose/v4"
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
oidc "github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
op "github.com/zitadel/oidc/v3/pkg/op"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockStorage is a mock of Storage interface.
|
// MockStorage is a mock of Storage interface.
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
|
|
||||||
"github.com/golang/mock/gomock"
|
"github.com/golang/mock/gomock"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewStorage(t *testing.T) op.Storage {
|
func NewStorage(t *testing.T) op.Storage {
|
||||||
|
|
|
@ -14,8 +14,8 @@ import (
|
||||||
"go.opentelemetry.io/otel"
|
"go.opentelemetry.io/otel"
|
||||||
"golang.org/x/text/language"
|
"golang.org/x/text/language"
|
||||||
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -11,12 +11,12 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/example/server/storage"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
"github.com/muhlemmer/gu"
|
"github.com/muhlemmer/gu"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"github.com/zitadel/oidc/v3/example/server/storage"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
|
||||||
"golang.org/x/text/language"
|
"golang.org/x/text/language"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ProbesFn func(context.Context) error
|
type ProbesFn func(context.Context) error
|
||||||
|
|
|
@ -5,9 +5,9 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/muhlemmer/gu"
|
"github.com/muhlemmer/gu"
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Server describes the interface that needs to be implemented to serve
|
// Server describes the interface that needs to be implemented to serve
|
||||||
|
|
|
@ -6,11 +6,11 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
"github.com/rs/cors"
|
"github.com/rs/cors"
|
||||||
"github.com/zitadel/logging"
|
"github.com/zitadel/logging"
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
"github.com/zitadel/schema"
|
"github.com/zitadel/schema"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ import (
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/client"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/client"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
func jwtProfile() (string, error) {
|
func jwtProfile() (string, error) {
|
||||||
|
|
|
@ -14,11 +14,11 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/muhlemmer/gu"
|
"github.com/muhlemmer/gu"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
"github.com/zitadel/schema"
|
"github.com/zitadel/schema"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// ExtendedLegacyServer allows embedding [LegacyServer] in a struct,
|
// ExtendedLegacyServer allows embedding [LegacyServer] in a struct,
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
"path"
|
"path"
|
||||||
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SessionEnder interface {
|
type SessionEnder interface {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
jose "github.com/go-jose/go-jose/v4"
|
jose "github.com/go-jose/go-jose/v4"
|
||||||
"golang.org/x/text/language"
|
"golang.org/x/text/language"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AuthStorage interface {
|
type AuthStorage interface {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"slices"
|
"slices"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/crypto"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/crypto"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TokenCreator interface {
|
type TokenCreator interface {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ClientCredentialsExchange handles the OAuth 2.0 client_credentials grant, including
|
// ClientCredentialsExchange handles the OAuth 2.0 client_credentials grant, including
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
// CodeExchange handles the OAuth 2.0 authorization_code grant, including
|
// CodeExchange handles the OAuth 2.0 authorization_code grant, including
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TokenExchangeRequest interface {
|
type TokenExchangeRequest interface {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Introspector interface {
|
type Introspector interface {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type JWTAuthorizationGrantExchanger interface {
|
type JWTAuthorizationGrantExchanger interface {
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"slices"
|
"slices"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RefreshTokenRequest interface {
|
type RefreshTokenRequest interface {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Exchanger interface {
|
type Exchanger interface {
|
||||||
|
|
|
@ -3,22 +3,22 @@ package op_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAuthorizeCodeChallenge(t *testing.T) {
|
func TestAuthorizeCodeChallenge(t *testing.T) {
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
codeVerifier string
|
codeVerifier string
|
||||||
codeChallenge *oidc.CodeChallenge
|
codeChallenge *oidc.CodeChallenge
|
||||||
want func(t *testing.T, err error)
|
want func(t *testing.T, err error)
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "missing both code_verifier and code_challenge",
|
name: "missing both code_verifier and code_challenge",
|
||||||
codeVerifier: "",
|
codeVerifier: "",
|
||||||
codeChallenge: nil,
|
codeChallenge: nil,
|
||||||
want: func(t *testing.T, err error) {
|
want: func(t *testing.T, err error) {
|
||||||
assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
},
|
},
|
||||||
|
@ -46,9 +46,9 @@ func TestAuthorizeCodeChallenge(t *testing.T) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "code_verifier provided without code_challenge",
|
name: "code_verifier provided without code_challenge",
|
||||||
codeVerifier: "code_verifier",
|
codeVerifier: "code_verifier",
|
||||||
codeChallenge: nil,
|
codeChallenge: nil,
|
||||||
want: func(t *testing.T, err error) {
|
want: func(t *testing.T, err error) {
|
||||||
assert.ErrorContains(t, err, "code_verifier unexpectedly provided")
|
assert.ErrorContains(t, err, "code_verifier unexpectedly provided")
|
||||||
},
|
},
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Revoker interface {
|
type Revoker interface {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
httphelper "github.com/zitadel/oidc/v3/pkg/http"
|
httphelper "git.christmann.info/LARA/zitadel-oidc/v3/pkg/http"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UserinfoProvider interface {
|
type UserinfoProvider interface {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package op
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AccessTokenVerifier oidc.Verifier
|
type AccessTokenVerifier oidc.Verifier
|
||||||
|
|
|
@ -4,9 +4,9 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
tu "github.com/zitadel/oidc/v3/internal/testutil"
|
tu "git.christmann.info/LARA/zitadel-oidc/v3/internal/testutil"
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MyCustomClaims extends the TokenClaims base,
|
// MyCustomClaims extends the TokenClaims base,
|
||||||
|
|
|
@ -5,10 +5,10 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
tu "git.christmann.info/LARA/zitadel-oidc/v3/internal/testutil"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
tu "github.com/zitadel/oidc/v3/internal/testutil"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNewAccessTokenVerifier(t *testing.T) {
|
func TestNewAccessTokenVerifier(t *testing.T) {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type IDTokenHintVerifier oidc.Verifier
|
type IDTokenHintVerifier oidc.Verifier
|
||||||
|
|
|
@ -6,10 +6,10 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
tu "git.christmann.info/LARA/zitadel-oidc/v3/internal/testutil"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
tu "github.com/zitadel/oidc/v3/internal/testutil"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNewIDTokenHintVerifier(t *testing.T) {
|
func TestNewIDTokenHintVerifier(t *testing.T) {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
|
|
||||||
jose "github.com/go-jose/go-jose/v4"
|
jose "github.com/go-jose/go-jose/v4"
|
||||||
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
)
|
)
|
||||||
|
|
||||||
// JWTProfileVerfiier extends oidc.Verifier with
|
// JWTProfileVerfiier extends oidc.Verifier with
|
||||||
|
|
|
@ -5,11 +5,11 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
tu "git.christmann.info/LARA/zitadel-oidc/v3/internal/testutil"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/oidc"
|
||||||
|
"git.christmann.info/LARA/zitadel-oidc/v3/pkg/op"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
tu "github.com/zitadel/oidc/v3/internal/testutil"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
|
||||||
"github.com/zitadel/oidc/v3/pkg/op"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNewJWTProfileVerifier(t *testing.T) {
|
func TestNewJWTProfileVerifier(t *testing.T) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue