cookie

package
v1.15.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2026 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TokenCookieName         = "__Host-token" // #nosec G101: cookie name label, not a credential
	InsecureTokenCookieName = "token"        // #nosec G101: cookie name label, not a credential
	OidcStateCookieName     = "oidc_state"
)

Functions

func BuildClearOidcStateCookieString

func BuildClearOidcStateCookieString(secure bool) string

BuildClearOidcStateCookieString builds a Set-Cookie header string to clear the OIDC state cookie.

func BuildClearTokenCookieString

func BuildClearTokenCookieString() string

BuildClearTokenCookieString builds a Set-Cookie header string to clear the token cookie.

func BuildOidcStateCookieString

func BuildOidcStateCookieString(value string, maxAgeInSeconds int, secure bool) string

BuildOidcStateCookieString builds a Set-Cookie header string for the OIDC state cookie.

func BuildTokenCookieString

func BuildTokenCookieString(maxAgeInSeconds int, token string) string

BuildTokenCookieString builds a Set-Cookie header string for Huma handlers. Uses the insecure cookie name since we can't detect TLS from context. For secure contexts, the middleware should handle the __Host- prefix.

func ClearTokenCookie

func ClearTokenCookie(c *gin.Context)

func GetTokenCookie

func GetTokenCookie(c *gin.Context) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL