Documentation ¶
Index ¶
Constants ¶
View Source
const ( SESSION_USER = "session_user" COOKIE_NAME = "sessionid" MAX_AGE time.Duration = 3600 )
Variables ¶
View Source
var ( RedirectUrl string = "/account/login" AdminRedirectUrl string = "/admin/account/login" RedirectParam string = "next" )
Functions ¶
func AdminRequired ¶
func AdminRequired(user User, req *http.Request, resp http.ResponseWriter)
func LoginRequired ¶
func LoginRequired(user User, req *http.Request, resp http.ResponseWriter)
Types ¶
type Option ¶
type Option struct { CookiePath string Domain string CookieName string // MaxAge=0 means no 'Max-Age' attribute specified. // MaxAge<0 means delete cookie now, equivalently 'Max-Age: 0'. // MaxAge>0 means Max-Age attribute present and given in seconds. MaxAge time.Duration Secure bool HttpOnly bool }
Option stores configuration for a session or session store.
Fields are a subset of http.Cookie fields.
Click to show internal directories.
Click to hide internal directories.