Sha256: 9171cee300296564bb12a02035edd9a1310380456ad6f4a7a37befa38a10796e

Contents?: true

Size: 913 Bytes

Versions: 6

Compression:

Stored size: 913 Bytes

Contents

module ActionDispatch::Routing
  class Mapper


    protected
    #########

    def devise_otp(mapping, controllers)

      namespace :otp, :module => :devise_otp do
        resource :token, :only => [:show, :update, :destroy],
                 :path => mapping.path_names[:token], :controller => controllers[:otp_tokens] do

          if Devise.otp_trust_persistence
            get  :persistence, :action => 'get_persistence'
            post :persistence, :action => 'clear_persistence'
            delete :persistence, :action => 'delete_persistence'
          end

          get  :recovery
        end

        resource :credential, :only => [:show, :update],
                 :path => mapping.path_names[:credentials], :controller => controllers[:otp_credentials] do

          get  :refresh, :action => 'get_refresh'
          put :refresh, :action => 'set_refresh'
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
devise-otp2-0.2.6 lib/devise_otp_authenticatable/routes.rb
devise-otp2-0.2.5 lib/devise_otp_authenticatable/routes.rb
devise-otp2-0.2.4 lib/devise_otp_authenticatable/routes.rb
devise-otp-rails5-0.2.4 lib/devise_otp_authenticatable/routes.rb
devise-otp-0.2.3 lib/devise_otp_authenticatable/routes.rb
devise-otp-0.2.2 lib/devise_otp_authenticatable/routes.rb