Module: Rodauth::OAuth::FeatureExtensions
- Defined in:
- lib/rodauth/oauth.rb
Instance Method Summary collapse
Instance Method Details
#auth_server_route(name, *args, &blk) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rodauth/oauth.rb', line 9 def auth_server_route(name, *args, &blk) routes = route(name, *args, &blk) handle_meth = routes.last define_method(:"#{handle_meth}_for_auth_server") do next unless send(:"#{handle_meth}_not_for_auth_server") end alias_method :"#{handle_meth}_not_for_auth_server", handle_meth alias_method handle_meth, :"#{handle_meth}_for_auth_server" # make all requests usable via internal_request feature internal_request_method name end |
#translatable_method(meth, value) ⇒ Object
override
28 29 30 31 |
# File 'lib/rodauth/oauth.rb', line 28 def translatable_method(meth, value) define_method(meth) { |*args| translate(meth, value, *args) } auth_value_methods(meth) end |