Documentation
¶
Overview ¶
Package types defines common types and constants used across the session package.
Index ¶
Constants ¶
View Source
const ( // SCAuthCookieName is the cookie name of the Secure Cookie SCAuthCookieName SCKey = "auth" // SCSessionID is the key for storing SessionID in Secure Cookie SCSessionID SCKey = "sessionID" // SCSameSiteStrict is a key representing sameSiteStrict cookie setting SCSameSiteStrict SCKey = "sameSiteStrict" // STCookieName is the cookie name of the Secure Token Cookie STCookieName = "XSRF-TOKEN" // STHeaderName is the header name of the Secure Token Cookie STHeaderName = "X-XSRF-TOKEN" // STSessionID is the key used in store sessionID in Secure Token Cookie STSessionID STKey = "sessionid" // STTokenExpiration is the key used to store the cookie expiration in the Secure Token Cookie STTokenExpiration STKey = "expiration" // XSRFCookieLife is constant controlling XSRF Cookie expiration XSRFCookieLife = time.Hour // XSRFReWriteWindow controls rewriting xsrf cookie token if it expires within duration XSRFReWriteWindow = 30 * time.Minute // CTXSessionID is the key for storing SessionID in context CTXSessionID CTXKey = "sessionID" )
Variables ¶
View Source
var SafeMethods = methods([]string{"GET", "HEAD", "OPTIONS", "TRACE"})
SafeMethods are Idempotent methods as defined by RFC7231 section 4.2.2.
Functions ¶
func SessionIDFromCtx ¶
SessionIDFromCtx returns the sessionID from the request context
func SessionIDFromRequest ¶
SessionIDFromRequest returns the sessionID from the request
Types ¶
Click to show internal directories.
Click to hide internal directories.