Documentation
¶
Overview ¶
Package externalauthsupport defines which MCPExternalAuthConfig types each consumer kind accepts, shared by the operator controllers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppliedByVirtualMCPServer ¶
func AppliedByVirtualMCPServer(consumer Consumer, authType mcpv1beta1.ExternalAuthType) bool
AppliedByVirtualMCPServer reports whether consumer accepts authType without applying it: the type takes effect only when a VirtualMCPServer discovers the reference on that backend.
func Supports ¶
func Supports(consumer Consumer, authType mcpv1beta1.ExternalAuthType) bool
Supports reports whether consumer accepts a reference to authType.
func Validate ¶
func Validate(consumer Consumer, authType mcpv1beta1.ExternalAuthType) error
Validate returns an UnsupportedTypeError when consumer does not accept authType.
Types ¶
type Consumer ¶
type Consumer string
Consumer identifies a resource kind that consumes an MCPExternalAuthConfig.
const ( // ConsumerMCPServer identifies MCPServer.spec.externalAuthConfigRef. ConsumerMCPServer Consumer = "MCPServer" // ConsumerMCPRemoteProxy identifies MCPRemoteProxy.spec.externalAuthConfigRef. ConsumerMCPRemoteProxy Consumer = "MCPRemoteProxy" // ConsumerVirtualMCPServer identifies VirtualMCPServer outgoing authentication. ConsumerVirtualMCPServer Consumer = "VirtualMCPServer" // ConsumerMCPServerEntry identifies MCPServerEntry.spec.externalAuthConfigRef. ConsumerMCPServerEntry Consumer = "MCPServerEntry" )
type UnsupportedTypeError ¶
type UnsupportedTypeError struct {
Consumer Consumer
AuthType mcpv1beta1.ExternalAuthType
}
UnsupportedTypeError reports an MCPExternalAuthConfig type that cannot be used by a particular consumer.
func (*UnsupportedTypeError) Error ¶
func (e *UnsupportedTypeError) Error() string
Error implements error.