Documentation
¶
Overview ¶
Package httpctx provides shared helpers for extracting authentication context from gin-based HTTP handlers.
Both the native AgentBox API and the E2B-compatible API use oapi-codegen's strict server mode, which passes *gin.Context directly as context.Context. These helpers safely extract AuthInfo regardless of whether the context has been wrapped by context.WithValue.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthFrom ¶
AuthFrom extracts domain.AuthInfo from the context.
It first tries a direct *gin.Context type assertion (fast path when the context has not been wrapped). If that fails, it uses ctx.Value("auth") which traverses through any context.WithValue layers and reaches the underlying gin.Context's key store.
Types ¶
This section is empty.