MCPcopy
hub / github.com/writefreely/writefreely / webAuth

Function webAuth

handle.go:282–288  ·  view source on GitHub ↗
(app *App, r *http.Request)

Source from the content-addressed store, hash-verified

280}
281
282func webAuth(app *App, r *http.Request) (*User, error) {
283 u := getUserSession(app, r)
284 if u == nil {
285 return nil, ErrNotLoggedIn
286 }
287 return u, nil
288}
289
290// UserAPI handles requests made in the API by the authenticated user.
291// This provides user-friendly HTML pages and actions that work in the browser.

Callers 2

AllReaderMethod · 0.85
LogHandlerFuncMethod · 0.85

Calls 1

getUserSessionFunction · 0.85

Tested by

no test coverage detected