Class: Grape::Middleware::Auth::StrategyInfo

Inherits:
Struct
  • Object
show all
Defined in:
lib/grape/middleware/auth/strategy_info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#auth_classObject

Returns the value of attribute auth_class

Returns:

  • (Object)

    the current value of auth_class



6
7
8
# File 'lib/grape/middleware/auth/strategy_info.rb', line 6

def auth_class
  @auth_class
end

#settings_fetcherObject

Returns the value of attribute settings_fetcher

Returns:

  • (Object)

    the current value of settings_fetcher



6
7
8
# File 'lib/grape/middleware/auth/strategy_info.rb', line 6

def settings_fetcher
  @settings_fetcher
end

Instance Method Details

#create(app, options, &block) ⇒ Object



7
8
9
10
11
# File 'lib/grape/middleware/auth/strategy_info.rb', line 7

def create(app, options, &block)
  strategy_args = settings_fetcher.call(options)

  auth_class.new(app, *strategy_args, &block)
end