Home Can't authenticate access to Rack Application mounted in Rails 4.0
Reply: 0

Can't authenticate access to Rack Application mounted in Rails 4.0

user1107
1#
user1107 Published in June 20, 2018, 7:29 am

So I'm struggling to figure out a reasonable way to authenticate a Rake Application through my rails app so that the route it is on is only accessible to admin users.

I am mounting the Rake Application like so:

mount RakeApplication => "admin/route/to/application"

We had been using this rake application as a developer tool, then realized that it provided information and views which we wanted to make available to admin users. Changing the route and making it appear on the production server was easy. Finding a rails way to authenticate the user has not been. I am not primarily a Rails developer, so searching for a solution has been a struggle.

Our current means of admin authentication is using an ActiveSupport::Concern module included on each admin RESTful controller, which, of course, doesn't exist for this rake application.

We are at the point where my manager is wanting to just start using .htpasswd on an nginx server to drop in password protection. Any suggestions would be appreciated.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.370555 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO