MCPcopy
hub / github.com/oauth2-proxy/oauth2-proxy / Load

Method Load

pkg/sessions/persistence/manager.go:57–69  ·  view source on GitHub ↗

Load reads sessions.SessionState information from a session store. It will use the session ticket from the http.Request's cookie.

(req *http.Request)

Source from the content-addressed store, hash-verified

55// Load reads sessions.SessionState information from a session store. It will
56// use the session ticket from the http.Request's cookie.
57func (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.

Callers

nothing calls this directly

Calls 3

decodeTicketFromRequestFunction · 0.85
LoadMethod · 0.65
loadSessionMethod · 0.45

Tested by

no test coverage detected