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



4
5
6
# File 'lib/grape/middleware/auth/strategy_info.rb', line 4

def auth_class
  @auth_class
end

#settings_fetcherObject

Returns the value of attribute settings_fetcher

Returns:

  • (Object)

    the current value of settings_fetcher



4
5
6
# File 'lib/grape/middleware/auth/strategy_info.rb', line 4

def settings_fetcher
  @settings_fetcher
end

Instance Method Details

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



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

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

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