mirror of
https://github.com/wso2/open-mcp-auth-proxy.git
synced 2025-08-18 12:19:56 +00:00
Misc improvements
This commit is contained in:
parent
b30aa6273c
commit
8589035d64
8 changed files with 222 additions and 156 deletions
|
@ -13,8 +13,9 @@ import (
|
|||
type TransportMode string
|
||||
|
||||
const (
|
||||
SSETransport TransportMode = "sse"
|
||||
StdioTransport TransportMode = "stdio"
|
||||
SSETransport TransportMode = "sse"
|
||||
StdioTransport TransportMode = "stdio"
|
||||
StreamableHTTPTransport TransportMode = "streamable_http"
|
||||
)
|
||||
|
||||
// Common path configuration for all transport modes
|
||||
|
@ -68,6 +69,15 @@ type ResponseConfig struct {
|
|||
CodeChallengeMethodsSupported []string `yaml:"code_challenge_methods_supported,omitempty"`
|
||||
}
|
||||
|
||||
type ProtectedResourceMetadata struct {
|
||||
ResourceIdentifier string `yaml:"resource_identifier"`
|
||||
Audience string `yaml:"audience"`
|
||||
ScopesSupported []map[string]interface{} `yaml:"scopes_supported"`
|
||||
AuthorizationServers []string `yaml:"authorization_servers"`
|
||||
JwksURI string `yaml:"jwks_uri,omitempty"`
|
||||
BearerMethodsSupported []string `yaml:"bearer_methods_supported,omitempty"`
|
||||
}
|
||||
|
||||
type PathConfig struct {
|
||||
// For well-known endpoint
|
||||
Response *ResponseConfig `yaml:"response,omitempty"`
|
||||
|
@ -86,6 +96,7 @@ type DefaultConfig struct {
|
|||
}
|
||||
|
||||
type Config struct {
|
||||
ProxyBaseURL string `yaml:"proxy_base_url"`
|
||||
AuthServerBaseURL string
|
||||
ListenPort int `yaml:"listen_port"`
|
||||
BaseURL string `yaml:"base_url"`
|
||||
|
@ -98,7 +109,6 @@ type Config struct {
|
|||
TransportMode TransportMode `yaml:"transport_mode"`
|
||||
Paths PathsConfig `yaml:"paths"`
|
||||
Stdio StdioConfig `yaml:"stdio"`
|
||||
RequiredScopes map[string]string `yaml:"required_scopes"`
|
||||
|
||||
// Nested config for Asgardeo
|
||||
Demo DemoConfig `yaml:"demo"`
|
||||
|
@ -106,12 +116,7 @@ type Config struct {
|
|||
Default DefaultConfig `yaml:"default"`
|
||||
|
||||
// Protected resource metadata
|
||||
Audience string `yaml:"audience"`
|
||||
ResourceIdentifier string `yaml:"resource_identifier"`
|
||||
ScopesSupported any `yaml:"scopes_supported"`
|
||||
AuthorizationServers []string `yaml:"authorization_servers"`
|
||||
JwksURI string `yaml:"jwks_uri,omitempty"`
|
||||
BearerMethodsSupported []string `yaml:"bearer_methods_supported,omitempty"`
|
||||
ProtectedResourceMetadata ProtectedResourceMetadata `yaml:"protected_resource_metadata"`
|
||||
}
|
||||
|
||||
// Validate checks if the config is valid based on transport mode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue