MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / makeSession

Method makeSession

rest/session_api.go:133–140  ·  view source on GitHub ↗

makeSession creates a user session and responds with CouchDB compatible session info.

(user auth.User)

Source from the content-addressed store, hash-verified

131
132// makeSession creates a user session and responds with CouchDB compatible session info.
133func (h *handler) makeSession(user auth.User) error {
134 oneTime := false
135 _, err := h.makeSessionWithTTL(user, defaultSessionTTL, oneTime)
136 if err != nil {
137 return err
138 }
139 return h.respondWithSessionInfo()
140}
141
142// Creates a session with TTL and adds to the response. Does NOT return the session info response.
143func (h *handler) makeSessionWithTTL(user auth.User, expiry time.Duration, oneTime bool) (sessionID string, err error) {

Callers 1

Calls 2

makeSessionWithTTLMethod · 0.95

Tested by

no test coverage detected