cookie

package
v0.9.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearSession

func ClearSession(response http.ResponseWriter)

ClearSession clears the cookie from http.Request

func GetSessionIdAndLoginTimeFromCookie

func GetSessionIdAndLoginTimeFromCookie(request *http.Request) (sessionId, loginTime string, err error)

GetSessionIdAndLoginTimeFromCookie extracts sessionId and logged-in time from http.Request

func GetSessionIdFromCookie

func GetSessionIdFromCookie(request *http.Request) (sessionId string, err error)

GetSessionIdFromCookie extracts sessionId from http.Request

func GetSessionIdFromRawCookie added in v0.5.3

func GetSessionIdFromRawCookie(cookieStr string) (sessionId string, err error)

GetSessionIdFromRawCookie extracts sessionId from a raw cookie string

func GetUniqueSessionId

func GetUniqueSessionId() string

GetUniqueSessionId generates a sessionId for each logged-in user

func SetSession

func SetSession(sessionId string, response http.ResponseWriter, cookieDomain string) error

SetSession sets the cookie in the http.Response

Types

This section is empty.

Jump to

Keyboard shortcuts

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