Class: Grape::Kong::Authenticable

Inherits:
Middleware::Base
  • Object
show all
Defined in:
lib/grape/kong/authenticable.rb

Instance Method Summary collapse

Instance Method Details

#beforeObject



11
12
13
14
15
16
# File 'lib/grape/kong/authenticable.rb', line 11

def before
  authenticate!
  context.extend Grape::Kong::Methods
  context.resource_owner = resource_owner
  context.scopes = scopes
end

#contextObject



7
8
9
# File 'lib/grape/kong/authenticable.rb', line 7

def context
  env['api.endpoint']
end