Module: Grape::Middleware::Auth::Strategies
- Defined in:
- lib/grape/middleware/auth/strategies.rb
Class Method Summary collapse
- .[](label) ⇒ Object
- .add(label, strategy, option_fetcher = ->(_) { [] }) ⇒ Object
- .auth_strategies ⇒ Object
Class Method Details
.[](label) ⇒ Object
19 20 21 |
# File 'lib/grape/middleware/auth/strategies.rb', line 19 def [](label) auth_strategies[label] end |
.add(label, strategy, option_fetcher = ->(_) { [] }) ⇒ Object
9 10 11 |
# File 'lib/grape/middleware/auth/strategies.rb', line 9 def add(label, strategy, option_fetcher = ->(_) { [] }) auth_strategies[label] = StrategyInfo.new(strategy, option_fetcher) end |
.auth_strategies ⇒ Object
13 14 15 16 17 |
# File 'lib/grape/middleware/auth/strategies.rb', line 13 def auth_strategies @auth_strategies ||= { http_basic: StrategyInfo.new(Rack::Auth::Basic, ->(settings) { [settings[:realm]] }) } end |