MCPcopy
hub / github.com/filebrowser/filebrowser / renewHandler

Function renewHandler

http/auth.go:232–237  ·  view source on GitHub ↗
(tokenExpireTime time.Duration)

Source from the content-addressed store, hash-verified

230}
231
232func renewHandler(tokenExpireTime time.Duration) handleFunc {
233 return withUser(func(w http.ResponseWriter, r *http.Request, d *data) (int, error) {
234 w.Header().Set("X-Renew-Token", "false")
235 return printToken(w, r, d, d.user, tokenExpireTime)
236 })
237}
238
239func printToken(w http.ResponseWriter, _ *http.Request, d *data, user *users.User, tokenExpirationTime time.Duration) (int, error) {
240 claims := &authToken{

Callers 1

NewHandlerFunction · 0.85

Calls 2

withUserFunction · 0.85
printTokenFunction · 0.85

Tested by

no test coverage detected