cookie

package
v0.0.0-...-1726717 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteAdminCookie

func DeleteAdminCookie(gc *gin.Context, adminCookieSecure bool)

DeleteAdminCookie sets the response cookie to empty

func DeleteMfaSession

func DeleteMfaSession(gc *gin.Context, appCookieSecure bool)

DeleteMfaSession deletes the mfa session cookies to expire

func DeleteSession

func DeleteSession(gc *gin.Context, appCookieSecure bool, sameSite http.SameSite)

DeleteSession sets session cookies to expire

func GetAdminCookie

func GetAdminCookie(gc *gin.Context) (string, error)

GetAdminCookie gets the admin cookie from the request

func GetMfaSession

func GetMfaSession(gc *gin.Context) (string, error)

GetMfaSession gets the mfa session cookie from context

func GetSession

func GetSession(gc *gin.Context) (string, error)

GetSession gets the session cookie from context

func ParseSameSite

func ParseSameSite(value string) http.SameSite

ParseSameSite converts a string ("lax", "strict", "none") to http.SameSite. Defaults to Lax for unrecognized values. The CLI flag --app-cookie-same-site defaults to "none" for backward compatibility with cross-domain SDK setups.

func SetAdminCookie

func SetAdminCookie(gc *gin.Context, token string, adminCookieSecure bool)

SetAdminCookie sets the admin cookie in the response

func SetMfaSession

func SetMfaSession(gc *gin.Context, sessionID string, appCookieSecure bool)

SetMfaSession sets the mfa session cookie in the response

func SetSession

func SetSession(gc *gin.Context, sessionID string, appCookieSecure bool, sameSite http.SameSite)

SetSession sets the session cookie in the response

Types

This section is empty.

Jump to

Keyboard shortcuts

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