Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupHandlers ¶
func SetupHandlers(gatewayClient *client.Client, oauthChecker *MCPOAuthHandlerFactory, tokenService *jwt.TokenService, oauthConfig services.OAuthAuthorizationServerConfig, baseURL string, mux *server.Server)
Types ¶
type Error ¶
type Error struct { Code ErrorCode `json:"error"` Description string `json:"error_description,omitempty"` State string `json:"state,omitempty"` }
Error represents an OAuth 2.0 error response.
type ErrorCode ¶
type ErrorCode string
ErrorCode defines the set of OAuth 2.0 error codes as per RFC 6749.
const ( ErrInvalidRequest ErrorCode = "invalid_request" ErrAccessDenied ErrorCode = "access_denied" ErrUnsupportedResponseType ErrorCode = "unsupported_response_type" ErrInvalidScope ErrorCode = "invalid_scope" ErrServerError ErrorCode = "server_error" ErrInvalidClientMetadata ErrorCode = "invalid_client_metadata" )
type MCPOAuthHandlerFactory ¶
type MCPOAuthHandlerFactory struct {
// contains filtered or unexported fields
}
func NewMCPOAuthHandlerFactory ¶
func NewMCPOAuthHandlerFactory(baseURL string, sessionManager *mcp.SessionManager, client kclient.Client, gptClient *gptscript.GPTScript, gatewayClient *client.Client, globalTokenStore mcp.GlobalTokenStore) *MCPOAuthHandlerFactory
func (*MCPOAuthHandlerFactory) CheckForMCPAuth ¶
func (f *MCPOAuthHandlerFactory) CheckForMCPAuth(ctx context.Context, mcpServer v1.MCPServer, mcpServerConfig mcp.ServerConfig, userID, mcpID, oauthAppAuthRequestID string) (string, error)
Click to show internal directories.
Click to hide internal directories.