From f449485a50686af7cf2183d9bd466037a656ace7 Mon Sep 17 00:00:00 2001 From: Pratham-Mishra04 Date: Sun, 28 Jun 2026 12:22:16 +0530 Subject: [PATCH] refactor: mcp files renamed to remove _ in file name --- ...{mcp_per_user_headers.go => mcpheaders.go} | 0 .../tables/{mcp_library.go => mcplibrary.go} | 0 .../tables/{oauth.go => mcpoauth2.go} | 36 +++++++++---------- .../{routing_rules.go => routingrules.go} | 0 .../tables/{temp_token.go => temptokens.go} | 0 ...{mcp_per_user_headers.go => mcpheaders.go} | 0 .../handlers/{oauth2.go => mcpoauth2.go} | 0 .../{mcp_sessions.go => mcpsessions.go} | 0 ...p_sessions_test.go => mcpsessions_test.go} | 0 .../{temp_token_scopes.go => temptokens.go} | 0 10 files changed, 18 insertions(+), 18 deletions(-) rename framework/configstore/tables/{mcp_per_user_headers.go => mcpheaders.go} (100%) rename framework/configstore/tables/{mcp_library.go => mcplibrary.go} (100%) rename framework/configstore/tables/{oauth.go => mcpoauth2.go} (84%) rename framework/configstore/tables/{routing_rules.go => routingrules.go} (100%) rename framework/configstore/tables/{temp_token.go => temptokens.go} (100%) rename transports/bifrost-http/handlers/{mcp_per_user_headers.go => mcpheaders.go} (100%) rename transports/bifrost-http/handlers/{oauth2.go => mcpoauth2.go} (100%) rename transports/bifrost-http/handlers/{mcp_sessions.go => mcpsessions.go} (100%) rename transports/bifrost-http/handlers/{mcp_sessions_test.go => mcpsessions_test.go} (100%) rename transports/bifrost-http/handlers/{temp_token_scopes.go => temptokens.go} (100%) diff --git a/framework/configstore/tables/mcp_per_user_headers.go b/framework/configstore/tables/mcpheaders.go similarity index 100% rename from framework/configstore/tables/mcp_per_user_headers.go rename to framework/configstore/tables/mcpheaders.go diff --git a/framework/configstore/tables/mcp_library.go b/framework/configstore/tables/mcplibrary.go similarity index 100% rename from framework/configstore/tables/mcp_library.go rename to framework/configstore/tables/mcplibrary.go diff --git a/framework/configstore/tables/oauth.go b/framework/configstore/tables/mcpoauth2.go similarity index 84% rename from framework/configstore/tables/oauth.go rename to framework/configstore/tables/mcpoauth2.go index 3012baeeed..652d0d902d 100644 --- a/framework/configstore/tables/oauth.go +++ b/framework/configstore/tables/mcpoauth2.go @@ -12,26 +12,26 @@ import ( // TableOauthConfig represents an OAuth configuration in the database // This stores the OAuth client configuration and flow state type TableOauthConfig struct { - ID string `gorm:"type:varchar(255);primaryKey" json:"id"` // UUID + ID string `gorm:"type:varchar(255);primaryKey" json:"id"` // UUID ClientID *schemas.SecretVar `gorm:"type:varchar(512)" json:"client_id"` // OAuth provider's client ID (optional for public clients) ClientSecret *schemas.SecretVar `gorm:"type:text" json:"-"` // Encrypted OAuth client secret (optional for public clients) - AuthorizeURL string `gorm:"type:text" json:"authorize_url"` // Provider's authorization endpoint (optional, can be discovered) - TokenURL string `gorm:"type:text" json:"token_url"` // Provider's token endpoint (optional, can be discovered) - RegistrationURL *string `gorm:"type:text" json:"registration_url,omitempty"` // Provider's dynamic registration endpoint (optional, can be discovered) - RedirectURI string `gorm:"type:text;not null" json:"redirect_uri"` // Callback URL - Scopes string `gorm:"type:text" json:"scopes"` // JSON array of scopes (optional, can be discovered) - State string `gorm:"type:varchar(255);uniqueIndex;not null" json:"-"` // CSRF state token - CodeVerifier string `gorm:"type:text" json:"-"` // PKCE code verifier (generated, kept secret) - CodeChallenge string `gorm:"type:varchar(255)" json:"code_challenge"` // PKCE code challenge (sent to provider) - Status string `gorm:"type:varchar(50);not null;index" json:"status"` // "pending", "authorized", "failed", "expired", "revoked" - TokenID *string `gorm:"type:varchar(255);index" json:"token_id"` // Foreign key to oauth_tokens.ID (set after callback) - ServerURL string `gorm:"type:text" json:"server_url"` // MCP server URL for OAuth discovery - UseDiscovery bool `gorm:"default:false" json:"use_discovery"` // Flag to enable OAuth discovery - MCPClientConfigJSON *string `gorm:"type:text" json:"-"` // JSON serialized MCPClientConfig for multi-instance support (pending MCP client waiting for OAuth completion) - EncryptionStatus string `gorm:"type:varchar(20);default:'plain_text'" json:"-"` - CreatedAt time.Time `gorm:"index;not null" json:"created_at"` - UpdatedAt time.Time `gorm:"index;not null" json:"updated_at"` - ExpiresAt time.Time `gorm:"index;not null" json:"expires_at"` // State expiry (15 min) + AuthorizeURL string `gorm:"type:text" json:"authorize_url"` // Provider's authorization endpoint (optional, can be discovered) + TokenURL string `gorm:"type:text" json:"token_url"` // Provider's token endpoint (optional, can be discovered) + RegistrationURL *string `gorm:"type:text" json:"registration_url,omitempty"` // Provider's dynamic registration endpoint (optional, can be discovered) + RedirectURI string `gorm:"type:text;not null" json:"redirect_uri"` // Callback URL + Scopes string `gorm:"type:text" json:"scopes"` // JSON array of scopes (optional, can be discovered) + State string `gorm:"type:varchar(255);uniqueIndex;not null" json:"-"` // CSRF state token + CodeVerifier string `gorm:"type:text" json:"-"` // PKCE code verifier (generated, kept secret) + CodeChallenge string `gorm:"type:varchar(255)" json:"code_challenge"` // PKCE code challenge (sent to provider) + Status string `gorm:"type:varchar(50);not null;index" json:"status"` // "pending", "authorized", "failed", "expired", "revoked" + TokenID *string `gorm:"type:varchar(255);index" json:"token_id"` // Foreign key to oauth_tokens.ID (set after callback) + ServerURL string `gorm:"type:text" json:"server_url"` // MCP server URL for OAuth discovery + UseDiscovery bool `gorm:"default:false" json:"use_discovery"` // Flag to enable OAuth discovery + MCPClientConfigJSON *string `gorm:"type:text" json:"-"` // JSON serialized MCPClientConfig for multi-instance support (pending MCP client waiting for OAuth completion) + EncryptionStatus string `gorm:"type:varchar(20);default:'plain_text'" json:"-"` + CreatedAt time.Time `gorm:"index;not null" json:"created_at"` + UpdatedAt time.Time `gorm:"index;not null" json:"updated_at"` + ExpiresAt time.Time `gorm:"index;not null" json:"expires_at"` // State expiry (15 min) } // TableName sets the table name diff --git a/framework/configstore/tables/routing_rules.go b/framework/configstore/tables/routingrules.go similarity index 100% rename from framework/configstore/tables/routing_rules.go rename to framework/configstore/tables/routingrules.go diff --git a/framework/configstore/tables/temp_token.go b/framework/configstore/tables/temptokens.go similarity index 100% rename from framework/configstore/tables/temp_token.go rename to framework/configstore/tables/temptokens.go diff --git a/transports/bifrost-http/handlers/mcp_per_user_headers.go b/transports/bifrost-http/handlers/mcpheaders.go similarity index 100% rename from transports/bifrost-http/handlers/mcp_per_user_headers.go rename to transports/bifrost-http/handlers/mcpheaders.go diff --git a/transports/bifrost-http/handlers/oauth2.go b/transports/bifrost-http/handlers/mcpoauth2.go similarity index 100% rename from transports/bifrost-http/handlers/oauth2.go rename to transports/bifrost-http/handlers/mcpoauth2.go diff --git a/transports/bifrost-http/handlers/mcp_sessions.go b/transports/bifrost-http/handlers/mcpsessions.go similarity index 100% rename from transports/bifrost-http/handlers/mcp_sessions.go rename to transports/bifrost-http/handlers/mcpsessions.go diff --git a/transports/bifrost-http/handlers/mcp_sessions_test.go b/transports/bifrost-http/handlers/mcpsessions_test.go similarity index 100% rename from transports/bifrost-http/handlers/mcp_sessions_test.go rename to transports/bifrost-http/handlers/mcpsessions_test.go diff --git a/transports/bifrost-http/handlers/temp_token_scopes.go b/transports/bifrost-http/handlers/temptokens.go similarity index 100% rename from transports/bifrost-http/handlers/temp_token_scopes.go rename to transports/bifrost-http/handlers/temptokens.go