Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMetadataHandler ¶
func NewMetadataHandler(config MetadataHandlerConfig) http.HandlerFunc
NewMetadataHandler creates an HTTP handler that serves OAuth 2.0 protected resource metadata
Types ¶
type ClientInfo ¶ added in v0.17.0
type ClientInfo struct {
Name string `json:"name"`
ClientID string `json:"client_id"`
Scopes []string `json:"scopes"`
}
ClientInfo represents an OAuth client configuration for external integrations.
type MetadataHandlerConfig ¶
type MetadataHandlerConfig struct {
ResourceName string
ResourceURL string
AuthorizationServers []string
Clients []ClientInfo
SecurityEnabled bool
Logger *slog.Logger
}
MetadataHandlerConfig holds configuration for the OAuth metadata handler
type ProtectedResourceMetadata ¶
type ProtectedResourceMetadata struct {
ResourceName string `json:"resource_name"`
Resource string `json:"resource"`
AuthorizationServers []string `json:"authorization_servers"`
BearerMethodsSupported []string `json:"bearer_methods_supported"`
ScopesSupported []string `json:"scopes_supported"`
OpenChoreoClients []ClientInfo `json:"openchoreo_clients,omitempty"`
OpenChoreoSecurityEnabled bool `json:"openchoreo_security_enabled"`
}
ProtectedResourceMetadata represents OAuth 2.0 protected resource metadata as defined in RFC 9728. Additional OpenChoreo-specific extension fields use the openchoreo_ prefix as permitted by RFC 9728 §2.
Click to show internal directories.
Click to hide internal directories.