Module: Pathway::Plugins::SimpleAuth::InstanceMethods
- Defined in:
- lib/pathway/plugins/simple_auth.rb
Instance Method Summary collapse
Instance Method Details
#authorize(state, using: nil) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/pathway/plugins/simple_auth.rb', line 13 def (state, using: nil) auth_state = if using.is_a?(Array) (*state.values_at(*using)) else (state[using || result_key]) end auth_state.then { state } end |
#authorize_with(*objs) ⇒ Object
23 24 25 |
# File 'lib/pathway/plugins/simple_auth.rb', line 23 def (*objs) (*objs) ? wrap(objs) : error(:forbidden) end |
#authorized? ⇒ Boolean
27 28 29 |
# File 'lib/pathway/plugins/simple_auth.rb', line 27 def (*) true end |