Documentation
¶
Overview ¶
Package live forwards Codex realtime WebRTC session bootstrap requests.
Index ¶
- Constants
- type ClientSecretAuthorization
- type Handler
- func (h *Handler) AuthenticateClientSecret(request *http.Request) (ClientSecretAuthorization, bool, error)
- func (h *Handler) Close()
- func (h *Handler) CreateClientSecret(c *gin.Context)
- func (h *Handler) CreateLegacySession(c *gin.Context)
- func (h *Handler) Handle(c *gin.Context)
- func (h *Handler) HandleDirectWebsocket(c *gin.Context)
- func (h *Handler) HandleHangup(c *gin.Context)
- func (h *Handler) HandleRealtimeWebsocket(c *gin.Context)
- func (h *Handler) HandleSIPControl(c *gin.Context)
- func (h *Handler) HandleSideband(c *gin.Context)
- func (h *Handler) HandleTranscriptionSession(c *gin.Context)
- func (h *Handler) HandleTranslation(c *gin.Context)
- func (h *Handler) UpdateConfig(cfg *config.Config) error
Constants ¶
const ( ClientSecretSessionContextKey = "codexLiveClientSecretSession" ClientSecretPrincipalContextKey = "codexLiveClientSecretPrincipal" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientSecretAuthorization ¶ added in v7.2.128
type ClientSecretAuthorization struct {
Principal string
IssuerPrincipal string
IssuerProvider string
Session json.RawMessage
}
ClientSecretAuthorization contains the local session configuration associated with an ephemeral key.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler forwards Codex live session requests through the shared auth scheduler.
func NewHandler ¶
NewHandler creates a Codex live session handler.
func (*Handler) AuthenticateClientSecret ¶ added in v7.2.128
func (h *Handler) AuthenticateClientSecret(request *http.Request) (ClientSecretAuthorization, bool, error)
AuthenticateClientSecret validates a local ephemeral key when the request carries one.
func (*Handler) CreateClientSecret ¶ added in v7.2.128
CreateClientSecret creates a short-lived credential scoped to this proxy.
func (*Handler) CreateLegacySession ¶ added in v7.2.128
CreateLegacySession implements the deprecated Realtime session credential endpoint.
func (*Handler) Handle ¶
Handle forwards a WebRTC SDP bootstrap request to the Codex realtime calls endpoint.
func (*Handler) HandleDirectWebsocket ¶ added in v7.2.128
HandleDirectWebsocket relays a standard Realtime WebSocket through Codex OAuth.
func (*Handler) HandleHangup ¶ added in v7.2.128
HandleHangup forwards hangup for a locally created WebRTC call using its pinned OAuth credential.
func (*Handler) HandleRealtimeWebsocket ¶ added in v7.2.128
HandleRealtimeWebsocket dispatches a standard Realtime WebSocket or an existing call sideband.
func (*Handler) HandleSIPControl ¶ added in v7.2.128
HandleSIPControl reports that the Codex OAuth upstream has no SIP dialog capability.
func (*Handler) HandleSideband ¶
HandleSideband relays live session sideband WebSocket frames bidirectionally.
func (*Handler) HandleTranscriptionSession ¶ added in v7.2.128
HandleTranscriptionSession reports that the Codex OAuth upstream has no transcription-only capability.
func (*Handler) HandleTranslation ¶ added in v7.2.128
HandleTranslation reports that the Codex OAuth upstream has no translation session capability.