Load reads sessions.SessionState information from a session store. It will use the session ticket from the http.Request's cookie.
(req *http.Request)
| 55 | // Load reads sessions.SessionState information from a session store. It will |
| 56 | // use the session ticket from the http.Request's cookie. |
| 57 | func (m *Manager) Load(req *http.Request) (*sessions.SessionState, error) { |
| 58 | tckt, err := decodeTicketFromRequest(req, m.Options) |
| 59 | if err != nil { |
| 60 | return nil, err |
| 61 | } |
| 62 | |
| 63 | return tckt.loadSession( |
| 64 | func(key string) ([]byte, error) { |
| 65 | return m.Store.Load(req.Context(), key) |
| 66 | }, |
| 67 | m.Store.Lock, |
| 68 | ) |
| 69 | } |
| 70 | |
| 71 | // Clear clears any saved session information for a given ticket cookie. |
| 72 | // Then it clears all session data for that ticket in the Store. |
nothing calls this directly
no test coverage detected