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
15 16 17 18 19 20 21 22 23 |
# File 'lib/pathway/plugins/simple_auth.rb', line 15 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
25 26 27 |
# File 'lib/pathway/plugins/simple_auth.rb', line 25 def (*objs) (*objs) ? wrap(objs) : error(:forbidden) end |
#authorized? ⇒ Boolean
29 30 31 |
# File 'lib/pathway/plugins/simple_auth.rb', line 29 def (*) true end |