Skip to content

Commit

Permalink
higress-group version
Browse files Browse the repository at this point in the history
  • Loading branch information
Jing-ze committed Dec 26, 2024
1 parent f5a14a4 commit 55566a0
Show file tree
Hide file tree
Showing 31 changed files with 76 additions and 76 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/Jing-ze/oauth2-proxy
module github.com/higress-group/oauth2-proxy

go 1.19

Expand Down
6 changes: 3 additions & 3 deletions load.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package oidc
import (
"fmt"

"github.com/Jing-ze/oauth2-proxy/pkg/apis/options"
"github.com/Jing-ze/oauth2-proxy/pkg/mapstructure"
"github.com/Jing-ze/oauth2-proxy/pkg/validation"
"github.com/higress-group/oauth2-proxy/pkg/apis/options"
"github.com/higress-group/oauth2-proxy/pkg/mapstructure"
"github.com/higress-group/oauth2-proxy/pkg/validation"

"github.com/tidwall/gjson"
)
Expand Down
24 changes: 12 additions & 12 deletions oauthproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ import (
"strings"
"time"

"github.com/Jing-ze/oauth2-proxy/pkg/apis/options"
sessionsapi "github.com/Jing-ze/oauth2-proxy/pkg/apis/sessions"
"github.com/Jing-ze/oauth2-proxy/pkg/app/redirect"
"github.com/Jing-ze/oauth2-proxy/pkg/cookies"
"github.com/Jing-ze/oauth2-proxy/pkg/encryption"
"github.com/Jing-ze/oauth2-proxy/pkg/middleware"
requestutil "github.com/Jing-ze/oauth2-proxy/pkg/requests/util"
"github.com/Jing-ze/oauth2-proxy/pkg/sessions"
"github.com/Jing-ze/oauth2-proxy/pkg/util"
"github.com/Jing-ze/oauth2-proxy/providers"

middlewareapi "github.com/Jing-ze/oauth2-proxy/pkg/apis/middleware"
"github.com/higress-group/oauth2-proxy/pkg/apis/options"
sessionsapi "github.com/higress-group/oauth2-proxy/pkg/apis/sessions"
"github.com/higress-group/oauth2-proxy/pkg/app/redirect"
"github.com/higress-group/oauth2-proxy/pkg/cookies"
"github.com/higress-group/oauth2-proxy/pkg/encryption"
"github.com/higress-group/oauth2-proxy/pkg/middleware"
requestutil "github.com/higress-group/oauth2-proxy/pkg/requests/util"
"github.com/higress-group/oauth2-proxy/pkg/sessions"
"github.com/higress-group/oauth2-proxy/pkg/util"
"github.com/higress-group/oauth2-proxy/providers"

middlewareapi "github.com/higress-group/oauth2-proxy/pkg/apis/middleware"

"github.com/alibaba/higress/plugins/wasm-go/pkg/wrapper"
"github.com/gorilla/mux"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/middleware/scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"net/http"

"github.com/Jing-ze/oauth2-proxy/pkg/apis/sessions"
"github.com/higress-group/oauth2-proxy/pkg/apis/sessions"
)

type scopeKey string
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/middleware/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"fmt"

sessionsapi "github.com/Jing-ze/oauth2-proxy/pkg/apis/sessions"
sessionsapi "github.com/higress-group/oauth2-proxy/pkg/apis/sessions"

oidc "github.com/Jing-ze/oauth2-proxy/pkg/providers/go_oidc"
oidc "github.com/higress-group/oauth2-proxy/pkg/providers/go_oidc"
)

// TokenToSessionFunc takes a raw ID Token and converts it into a SessionState.
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/sessions/session_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"encoding/json"

"github.com/Jing-ze/oauth2-proxy/pkg/clock"
"github.com/Jing-ze/oauth2-proxy/pkg/encryption"
"github.com/higress-group/oauth2-proxy/pkg/clock"
"github.com/higress-group/oauth2-proxy/pkg/encryption"
)

// // SessionState is used to store information about the currently authenticated user session
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/redirect/director.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"strings"

"github.com/Jing-ze/oauth2-proxy/pkg/util"
"github.com/higress-group/oauth2-proxy/pkg/util"
)

// AppDirector is responsible for determining where OAuth2 Proxy should redirect
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/redirect/getters.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"net/http"

requestutil "github.com/Jing-ze/oauth2-proxy/pkg/requests/util"
requestutil "github.com/higress-group/oauth2-proxy/pkg/requests/util"
)

// redirectGetter represents a method to allow the proxy to determine a redirect
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/redirect/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"regexp"
"strings"

"github.com/Jing-ze/oauth2-proxy/pkg/util"
"github.com/higress-group/oauth2-proxy/pkg/util"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions pkg/cookies/cookies.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"strings"
"time"

"github.com/Jing-ze/oauth2-proxy/pkg/apis/options"
"github.com/Jing-ze/oauth2-proxy/pkg/util"
"github.com/higress-group/oauth2-proxy/pkg/apis/options"
"github.com/higress-group/oauth2-proxy/pkg/util"

requestutil "github.com/Jing-ze/oauth2-proxy/pkg/requests/util"
requestutil "github.com/higress-group/oauth2-proxy/pkg/requests/util"
)

// MakeCookieFromOptions constructs a cookie based on the given *options.CookieOptions,
Expand Down
8 changes: 4 additions & 4 deletions pkg/cookies/csrf.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (
"net/http"
"time"

"github.com/Jing-ze/oauth2-proxy/pkg/apis/options"
"github.com/Jing-ze/oauth2-proxy/pkg/apis/sessions"
"github.com/higress-group/oauth2-proxy/pkg/apis/options"
"github.com/higress-group/oauth2-proxy/pkg/apis/sessions"

"encoding/json"

"github.com/Jing-ze/oauth2-proxy/pkg/clock"
"github.com/Jing-ze/oauth2-proxy/pkg/encryption"
"github.com/higress-group/oauth2-proxy/pkg/clock"
"github.com/higress-group/oauth2-proxy/pkg/encryption"
)

// CSRF manages various nonces stored in the CSRF cookie during the initial
Expand Down
2 changes: 1 addition & 1 deletion pkg/ip/realclientip.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"
"strings"

ipapi "github.com/Jing-ze/oauth2-proxy/pkg/apis/ip"
ipapi "github.com/higress-group/oauth2-proxy/pkg/apis/ip"
)

func GetRealClientIPParser(headerKey string) (ipapi.RealClientIPParser, error) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/middleware/scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package middleware
import (
"net/http"

middlewareapi "github.com/Jing-ze/oauth2-proxy/pkg/apis/middleware"
middlewareapi "github.com/higress-group/oauth2-proxy/pkg/apis/middleware"

"github.com/google/uuid"
"github.com/justinas/alice"
Expand Down
8 changes: 4 additions & 4 deletions pkg/middleware/stored_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"net/http"
"time"

middlewareapi "github.com/Jing-ze/oauth2-proxy/pkg/apis/middleware"
sessionsapi "github.com/Jing-ze/oauth2-proxy/pkg/apis/sessions"
"github.com/Jing-ze/oauth2-proxy/pkg/util"
middlewareapi "github.com/higress-group/oauth2-proxy/pkg/apis/middleware"
sessionsapi "github.com/higress-group/oauth2-proxy/pkg/apis/sessions"
"github.com/higress-group/oauth2-proxy/pkg/util"

oidc "github.com/Jing-ze/oauth2-proxy/pkg/providers/go_oidc"
oidc "github.com/higress-group/oauth2-proxy/pkg/providers/go_oidc"

"github.com/alibaba/higress/plugins/wasm-go/pkg/wrapper"
"github.com/higress-group/proxy-wasm-go-sdk/proxywasm"
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/go_oidc/jwks.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"net/http"
"time"

"github.com/Jing-ze/oauth2-proxy/pkg/util"
"github.com/higress-group/oauth2-proxy/pkg/util"

"github.com/alibaba/higress/plugins/wasm-go/pkg/wrapper"
"github.com/go-jose/go-jose/v4"
Expand Down
4 changes: 2 additions & 2 deletions pkg/providers/oidc/provider_verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"errors"
"fmt"

oidc "github.com/Jing-ze/oauth2-proxy/pkg/providers/go_oidc"
"github.com/Jing-ze/oauth2-proxy/pkg/providers/util"
oidc "github.com/higress-group/oauth2-proxy/pkg/providers/go_oidc"
"github.com/higress-group/oauth2-proxy/pkg/providers/util"
)

// ProviderVerifier represents the OIDC discovery and verification process
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/oidc/verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"reflect"

oidc "github.com/Jing-ze/oauth2-proxy/pkg/providers/go_oidc"
oidc "github.com/higress-group/oauth2-proxy/pkg/providers/go_oidc"
)

// idTokenVerifier allows an ID Token to be verified against the issue and provided keys.
Expand Down
2 changes: 1 addition & 1 deletion pkg/requests/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package util
import (
"net/http"

middlewareapi "github.com/Jing-ze/oauth2-proxy/pkg/apis/middleware"
middlewareapi "github.com/higress-group/oauth2-proxy/pkg/apis/middleware"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions pkg/sessions/cookie/session_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"regexp"
"time"

"github.com/Jing-ze/oauth2-proxy/pkg/apis/options"
"github.com/Jing-ze/oauth2-proxy/pkg/apis/sessions"
pkgcookies "github.com/Jing-ze/oauth2-proxy/pkg/cookies"
"github.com/Jing-ze/oauth2-proxy/pkg/encryption"
"github.com/higress-group/oauth2-proxy/pkg/apis/options"
"github.com/higress-group/oauth2-proxy/pkg/apis/sessions"
pkgcookies "github.com/higress-group/oauth2-proxy/pkg/cookies"
"github.com/higress-group/oauth2-proxy/pkg/encryption"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions pkg/sessions/session_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package sessions
import (
"fmt"

"github.com/Jing-ze/oauth2-proxy/pkg/apis/options"
"github.com/Jing-ze/oauth2-proxy/pkg/apis/sessions"
"github.com/Jing-ze/oauth2-proxy/pkg/sessions/cookie"
"github.com/higress-group/oauth2-proxy/pkg/apis/options"
"github.com/higress-group/oauth2-proxy/pkg/apis/sessions"
"github.com/higress-group/oauth2-proxy/pkg/sessions/cookie"
)

// NewSessionStore creates a SessionStore from the provided configuration
Expand Down
4 changes: 2 additions & 2 deletions pkg/validation/cookie.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"sort"
"time"

"github.com/Jing-ze/oauth2-proxy/pkg/apis/options"
"github.com/Jing-ze/oauth2-proxy/pkg/encryption"
"github.com/higress-group/oauth2-proxy/pkg/apis/options"
"github.com/higress-group/oauth2-proxy/pkg/encryption"
)

func validateCookie(o options.Cookie) []string {
Expand Down
4 changes: 2 additions & 2 deletions pkg/validation/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"net/url"
"strings"

"github.com/Jing-ze/oauth2-proxy/pkg/apis/options"
"github.com/Jing-ze/oauth2-proxy/pkg/util"
"github.com/higress-group/oauth2-proxy/pkg/apis/options"
"github.com/higress-group/oauth2-proxy/pkg/util"
)

// Validate checks that required options are set and validates those that they
Expand Down
2 changes: 1 addition & 1 deletion pkg/validation/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package validation
import (
"fmt"

"github.com/Jing-ze/oauth2-proxy/pkg/apis/options"
"github.com/higress-group/oauth2-proxy/pkg/apis/options"
)

// validateProviders is the initial validation migration for multiple providrers
Expand Down
4 changes: 2 additions & 2 deletions providers/aliyun.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"net/http"
"net/url"

"github.com/Jing-ze/oauth2-proxy/pkg/apis/sessions"
"github.com/Jing-ze/oauth2-proxy/pkg/util"
"github.com/alibaba/higress/plugins/wasm-go/pkg/wrapper"
"github.com/higress-group/oauth2-proxy/pkg/apis/sessions"
"github.com/higress-group/oauth2-proxy/pkg/util"
)

type AliyunProvider struct {
Expand Down
2 changes: 1 addition & 1 deletion providers/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"net/http"
"net/url"

"github.com/Jing-ze/oauth2-proxy/pkg/apis/sessions"
"github.com/alibaba/higress/plugins/wasm-go/pkg/wrapper"
"github.com/higress-group/oauth2-proxy/pkg/apis/sessions"
)

// GitHubProvider represents an GitHub based Identity Provider
Expand Down
2 changes: 1 addition & 1 deletion providers/internal_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"net/http"
"net/url"

"github.com/Jing-ze/oauth2-proxy/pkg/util"
"github.com/alibaba/higress/plugins/wasm-go/pkg/wrapper"
"github.com/higress-group/oauth2-proxy/pkg/util"
)

// stripToken is a helper function to obfuscate "access_token"
Expand Down
6 changes: 3 additions & 3 deletions providers/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"net/http"
"net/url"

"github.com/Jing-ze/oauth2-proxy/pkg/apis/options"
"github.com/Jing-ze/oauth2-proxy/pkg/apis/sessions"
"github.com/Jing-ze/oauth2-proxy/pkg/util"
"github.com/higress-group/oauth2-proxy/pkg/apis/options"
"github.com/higress-group/oauth2-proxy/pkg/apis/sessions"
"github.com/higress-group/oauth2-proxy/pkg/util"

"github.com/alibaba/higress/plugins/wasm-go/pkg/wrapper"
)
Expand Down
14 changes: 7 additions & 7 deletions providers/provider_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (
"regexp"
"strings"

"github.com/Jing-ze/oauth2-proxy/pkg/apis/options"
"github.com/Jing-ze/oauth2-proxy/pkg/apis/sessions"
"github.com/Jing-ze/oauth2-proxy/pkg/middleware"
oidc "github.com/Jing-ze/oauth2-proxy/pkg/providers/go_oidc"
internaloidc "github.com/Jing-ze/oauth2-proxy/pkg/providers/oidc"
"github.com/Jing-ze/oauth2-proxy/pkg/providers/util"
pkgutil "github.com/Jing-ze/oauth2-proxy/pkg/util"
"github.com/higress-group/oauth2-proxy/pkg/apis/options"
"github.com/higress-group/oauth2-proxy/pkg/apis/sessions"
"github.com/higress-group/oauth2-proxy/pkg/middleware"
oidc "github.com/higress-group/oauth2-proxy/pkg/providers/go_oidc"
internaloidc "github.com/higress-group/oauth2-proxy/pkg/providers/oidc"
"github.com/higress-group/oauth2-proxy/pkg/providers/util"
pkgutil "github.com/higress-group/oauth2-proxy/pkg/util"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions providers/provider_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"net/url"
"strings"

"github.com/Jing-ze/oauth2-proxy/pkg/apis/sessions"
"github.com/Jing-ze/oauth2-proxy/pkg/util"
"github.com/higress-group/oauth2-proxy/pkg/apis/sessions"
"github.com/higress-group/oauth2-proxy/pkg/util"

"github.com/alibaba/higress/plugins/wasm-go/pkg/wrapper"
)
Expand Down
10 changes: 5 additions & 5 deletions providers/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"net/url"
"strings"

"github.com/Jing-ze/oauth2-proxy/pkg/apis/options"
"github.com/Jing-ze/oauth2-proxy/pkg/apis/sessions"
internaloidc "github.com/Jing-ze/oauth2-proxy/pkg/providers/oidc"
"github.com/Jing-ze/oauth2-proxy/pkg/providers/util"
pkgutil "github.com/Jing-ze/oauth2-proxy/pkg/util"
"github.com/higress-group/oauth2-proxy/pkg/apis/options"
"github.com/higress-group/oauth2-proxy/pkg/apis/sessions"
internaloidc "github.com/higress-group/oauth2-proxy/pkg/providers/oidc"
"github.com/higress-group/oauth2-proxy/pkg/providers/util"
pkgutil "github.com/higress-group/oauth2-proxy/pkg/util"

"github.com/alibaba/higress/plugins/wasm-go/pkg/wrapper"
)
Expand Down
2 changes: 1 addition & 1 deletion providers/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"net/url"

pkgutil "github.com/Jing-ze/oauth2-proxy/pkg/util"
pkgutil "github.com/higress-group/oauth2-proxy/pkg/util"
)

const (
Expand Down

0 comments on commit 55566a0

Please sign in to comment.