Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSession ¶
func GetSession[I identity.UserIdentity](r *http.Request) identity.UserSession[I]
GetSession extracts the user session out of the http.Request, which will be an implementation of identity.UserSession.
If on session is found, an implementation of identity.UserSession where .Active() always returns false is returned, indicating there is no session.
Types ¶
type SetSession ¶
type SetSession[D identity.UserData[I], I identity.UserIdentity] struct { SessionCookieName string Sessions Sessions[I] Next http.Handler }
func (*SetSession[D, I]) ServeHTTP ¶
func (ss *SetSession[D, I]) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.