title: How to handle before filter for specific action in Grape?
body: <p>I'm mounting Grape in my Rails project to build a RESTful API. </p>
  
  <p>Now some end-points have actions need authentication and others which don't need authentication. </p>
  
  <p>As for example I have <code>users</code> end-point which looks something like:</p>
  
  <pre><code>module Backend
    module V1
      class Users &lt; Grape::API
        include Backend::V1::Defaults
  
        before { authenticate! }
  
        resource :users do
  
          desc "Return a user"
          params do
            requires :id, type: Integer, desc: 'User id'
          end
          get ':id' do
            UsersService::Fetch.new(current_user,params).call
          end
  
          desc "Update a user"
          params do
            requires :id, type: Integer, desc: 'User id'
            requires :display_name, type: String, desc: 'Display name'
            requires :email, type: String, desc: 'Email'
          end
          post ':id' do
            UsersService::Save.new(current_user,params).call
          end
  
          desc "Reset user password"
          params do
            requires :old_password, type: String, desc: 'old password'
            requires :password, type: String, desc: 'new password'
          end
          post 'password/reset' do
            PasswordService::Reset.new(current_user,params).call
          end
  
          desc "Forget password"
          params do
            requires :email, type: String
          end
          post 'password/forget' do
            PasswordService::Forget.new(current_user,params).call
          end            
  
        end
      end
    end
  end
  </code></pre>
  
  <p>Now as you can see, all the actions except <code>password/forget</code> needs the user to be logged-in/authenticated. It doesn't make sense too to create a new end-point let's say <code>passwords</code> and just remove <code>password/forget</code> there as logically speaking, this end-point should be related to users resource. </p>
  
  <p>The problem is with Grape <code>before</code> filter has no options like <code>except, only</code> in which I can say apply the filter for certain actions.</p>
  
  <p>How do you usually handle such a case in a clean way? </p>