Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultCookieName is the default cookie name used DefaultCookieName = "session" // DefaultCookiePath is the default cookie path DefaultCookiePath = "/" )
Variables ¶
View Source
var ErrNoSessionOnRequest = errors.New("no session on request")
ErrNoSessionOnRequest is thrown when a session is not found on a request
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service writes sessions on responseWriters and reads sessions from requests
func (*Service) DeleteSessionFromResponse ¶
func (s *Service) DeleteSessionFromResponse(w http.ResponseWriter) error
DeleteSessionFromResponse deletes a user session from a responseWriter
func (*Service) FetchSessionIDFromRequest ¶
FetchSessionIDFromRequest retrieves a signed session id from a request
func (*Service) SetSessionOnResponse ¶
func (s *Service) SetSessionOnResponse(signedSessionID string, userSession *user.Session, w http.ResponseWriter) error
SetSessionOnResponse sets a signed session id and a user session on a responseWriter
type ServiceInterface ¶
type ServiceInterface interface { SetSessionOnResponse(session string, userSession *user.Session, w http.ResponseWriter) error DeleteSessionFromResponse(w http.ResponseWriter) error FetchSessionIDFromRequest(r *http.Request) (string, error) }
ServiceInterface defines the methods performed by the transport service
Click to show internal directories.
Click to hide internal directories.