makeSession creates a user session and responds with CouchDB compatible session info.
(user auth.User)
| 131 | |
| 132 | // makeSession creates a user session and responds with CouchDB compatible session info. |
| 133 | func (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. |
| 143 | func (h *handler) makeSessionWithTTL(user auth.User, expiry time.Duration, oneTime bool) (sessionID string, err error) { |
no test coverage detected