Documentation
¶
Index ¶
Constants ¶
View Source
const (
ErrUnsupportedGrantType = ErrorCode("unsupported_grant_type")
)
Variables ¶
This section is empty.
Functions ¶
func SetupHandlers ¶
func SetupHandlers(oauthChecker *MCPOAuthHandlerFactory, tokenStore mcp.GlobalTokenStore, tokenService *persistent.TokenService, oauthConfig services.OAuthAuthorizationServerConfig, jwks system.EncodedJWKS, 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, jwks system.EncodedJWKS) *MCPOAuthHandlerFactory
func (*MCPOAuthHandlerFactory) CheckForMCPAuth ¶
func (f *MCPOAuthHandlerFactory) CheckForMCPAuth(req api.Context, mcpServer v1.MCPServer, mcpServerConfig mcp.ServerConfig, userID, mcpID, oauthAppAuthRequestID string) (string, error)
type TokenExchangeResponse ¶ added in v0.15.0
type TokenExchangeResponse struct {
AccessToken string `json:"access_token"`
IssuedTokenType string `json:"issued_token_type"`
TokenType string `json:"token_type"`
ExpiresIn int `json:"expires_in"`
}
TokenExchangeResponse represents an RFC 8693 token exchange response
Click to show internal directories.
Click to hide internal directories.