code: func (s *AuthServer) ExtendWebSession(user string, prevSessionID string) (services.WebSession, error) {
  	prevSession, err := s.GetWebSession(user, prevSessionID)
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  
  	// consider absolute expiry time that may be set for this session
  	// by some external identity serivce, so we can not renew this session
  	// any more without extra logic for renewal with external OIDC provider
  	expiresAt := prevSession.GetExpiryTime()
  	if !expiresAt.IsZero() && expiresAt.Before(s.clock.Now().UTC()) {
  		return nil, trace.NotFound("web session has expired")
  	}
  
  	sess, err := s.NewWebSession(user)
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	sess.SetExpiryTime(expiresAt)
  	bearerTokenTTL := utils.MinTTL(utils.ToTTL(s.clock, expiresAt), BearerTokenTTL)
  	sess.SetBearerTokenExpiryTime(s.clock.Now().UTC().Add(bearerTokenTTL))
  	if err := s.UpsertWebSession(user, sess); err != nil {
  		return nil, trace.Wrap(err)
  	}
  	sess, err = services.GetWebSessionMarshaler().ExtendWebSession(sess)
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	return sess, nil
  }
docs: // ExtendWebSession creates a new web session for a user based on a valid previous sessionID,
  // method is used to renew the web session for a user