cookie

package
v0.0.0-...-2ddb24b Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2025 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SessionCookieName  = "SessionId"
	StateCookieName    = "state"
	RedirectCookieName = "redirect_url"
	SessionMaxAge      = 86400 // 24 hours
	AuthCookieMaxAge   = 300   // 5 minutes
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CookieManager

type CookieManager struct {
	// contains filtered or unexported fields
}

func NewCookieManager

func NewCookieManager(
	config *config.Config,
) CookieManager

func (*CookieManager) CreateAuthCookies

func (cm *CookieManager) CreateAuthCookies(state, redirectURL string) []*http.Cookie

func (*CookieManager) CreateRevokeCookie

func (cm *CookieManager) CreateRevokeCookie() *http.Cookie

func (*CookieManager) CreateSessionCookie

func (cm *CookieManager) CreateSessionCookie(token string) *http.Cookie

Jump to

Keyboard shortcuts

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