Module: APIGuard::ClassMethods

Defined in:
lib/api/api_guard.rb

Instance Method Summary collapse

Instance Method Details

#guard_all!(scopes: []) ⇒ Object

Installs the doorkeeper guard on the whole Grape API endpoint.

Arguments:

scopes: (optional) scopes required for this guard.
        Defaults to empty array.

104
105
106
107
108
# File 'lib/api/api_guard.rb', line 104

def guard_all!(scopes: [])
  before do
    guard! scopes: scopes
  end
end