class Rodauth::Feature

def route(name=feature_name, default=name.to_s.tr('_', '-'), &block)

def route(name=feature_name, default=name.to_s.tr('_', '-'), &block)
  auth_value_method "#{name}_route", default
  handle_meth = "handle_#{name}"
  route_meth = :"#{name}_route"
  before route_meth
  define_method(handle_meth) do
    request.is send(route_meth) do
      before_rodauth
      instance_exec(request, &block)
    end
  end
  routes << handle_meth
end