code: func (h *Handler) renewSession(w http.ResponseWriter, r *http.Request, _ httprouter.Params, ctx *SessionContext) (interface{}, error) {
  	newSess, err := ctx.ExtendWebSession()
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	// transfer ownership over connections that were opened in the
  	// sessionContext
  	newContext, err := ctx.parent.ValidateSession(newSess.GetUser(), newSess.GetName())
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	newContext.AddClosers(ctx.TransferClosers()...)
  	if err := SetSession(w, newSess.GetUser(), newSess.GetName()); err != nil {
  		return nil, trace.Wrap(err)
  	}
  	return NewSessionResponse(newContext)
  }
docs: // renewSession is called to renew the session that is about to expire
  // it issues the new session and generates new session cookie.
  // It's important to understand that the old session becomes effectively invalid.
  //
  // POST /v1/webapi/sessions/renew
  //
  // Response
  //
  // {"type": "bearer", "token": "bearer token", "user": {"name": "alex", "allowed_logins": ["admin", "bob"]}, "expires_in": 20}
  //
  //