Home HTTP basic authorization in rails
Reply: 1

HTTP basic authorization in rails

rthi Published in 2017-11-13 10:32:12Z

I need to send Username and password in header of the request and get some json as response using HTTP basic authorization. I have set username and password in the controller using

http_basic_authenticate_with name: "dhh", password: "secret", except: :index

how should i send them using http header? someone please help

evngcdr Reply to 2017-11-13 12:03:57Z

Well I am not sure if I understood your question correctly, but you can bypass http basic auth like this:


And after that just return data you need in your controller.

You need to login account before you can post.

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

© 2016 Powered by mzan.com design MATCHINFO