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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/agents/oauth-expert.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Before providing guidance on OAuth/OIDC details, use WebFetch to verify RFC or s
- `pkg/auth/token.go`: JWT parsing, validation, claims extraction
- `pkg/auth/middleware.go`: HTTP authentication middleware
- `pkg/auth/oauth/`: OAuth 2.0 and OIDC client implementations
- `pkg/auth/tokenexchange/`: RFC 8693 token exchange
- `pkg/oauthproto/tokenexchange/`: RFC 8693 token exchange
- `pkg/auth/discovery/`: OAuth/OIDC discovery, RFC 9728 support
- `pkg/authserver/`: OAuth2 authorization server (Ory Fosite, PKCE, JWT/JWKS)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ type MCPExternalAuthConfigSpec struct {
// TokenExchangeConfig holds configuration for RFC-8693 OAuth 2.0 Token Exchange.
// This configuration is used to exchange incoming authentication tokens for tokens
// that can be used with external services.
// The structure matches the tokenexchange.Config from pkg/auth/tokenexchange/middleware.go
// The structure matches the tokenexchange.Config from pkg/oauthproto/tokenexchange/middleware.go
type TokenExchangeConfig struct {
// TokenURL is the OAuth 2.0 token endpoint URL for token exchange
// +kubebuilder:validation:Required
Expand Down
2 changes: 1 addition & 1 deletion cmd/thv-operator/pkg/controllerutil/tokenexchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/stacklok/toolhive/cmd/thv-operator/pkg/oidc"
"github.com/stacklok/toolhive/pkg/auth/awssts"
"github.com/stacklok/toolhive/pkg/auth/remote"
"github.com/stacklok/toolhive/pkg/auth/tokenexchange"
"github.com/stacklok/toolhive/pkg/oauthproto/tokenexchange"
"github.com/stacklok/toolhive/pkg/runner"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/thv/app/auth_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"github.com/spf13/cobra"

"github.com/stacklok/toolhive/pkg/auth/tokenexchange"
"github.com/stacklok/toolhive/pkg/oauthproto/tokenexchange"
"github.com/stacklok/toolhive/pkg/runner"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/thv/app/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"github.com/stacklok/toolhive/pkg/auth/discovery"
"github.com/stacklok/toolhive/pkg/auth/oauth"
"github.com/stacklok/toolhive/pkg/auth/remote"
"github.com/stacklok/toolhive/pkg/auth/tokenexchange"
"github.com/stacklok/toolhive/pkg/networking"
"github.com/stacklok/toolhive/pkg/oauthproto/tokenexchange"
"github.com/stacklok/toolhive/pkg/transport"
"github.com/stacklok/toolhive/pkg/transport/middleware"
"github.com/stacklok/toolhive/pkg/transport/proxy/transparent"
Expand Down
2 changes: 1 addition & 1 deletion docs/middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ thv config usage-metrics enable

**Purpose**: Exchanges incoming JWT tokens for external service tokens using OAuth 2.0 Token Exchange (RFC 8693).

**Location**: `pkg/auth/tokenexchange/middleware.go`
**Location**: `pkg/oauthproto/tokenexchange/middleware.go`

**Responsibilities**:
- Extract claims from authenticated JWT tokens
Expand Down
2 changes: 1 addition & 1 deletion docs/operator/crd-api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 43 additions & 43 deletions docs/server/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 43 additions & 43 deletions docs/server/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 39 additions & 39 deletions docs/server/swagger.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/oauthproto/grants.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func DoTokenRequest(client *http.Client, req *http.Request) (*TokenResponse, err
// pkg/networking.NewHttpClientBuilder. The builder blocks loopback and RFC
// 1918 ranges, which would break localhost IdPs (dex, Keycloak-in-Docker)
// and the httptest.NewServer-based tests that bind to 127.0.0.1. Not a
// default today for behavior-compatibility with pkg/auth/tokenexchange.
// default today for behavior-compatibility with pkg/oauthproto/tokenexchange.
func DefaultHTTPClient() *http.Client {
return sharedHTTPClient
}
Expand Down
Loading
Loading