Or, you could create your own solution like so:
https://gist.github.com/1986547
This is just a simple custom solution I created. I also went back and
built my own image verification system and tied it into this custom
solution.
But, I provided you the basics for handling authentication.
In my DB schema, my password field is called :password_digest. You
could feasibly name your password field in your DB to anything you
wanted. You just have to edit the methods I provided in the gist.
I also copied much of this initial code right from Rails when I first
started using Bcrypt.
I hope that helps get you started.
--
Posted via http://www.ruby-forum.com/.
>Well for starters you could use an authentication solution like Devise.>Or, you could create your own solution like so:
>https://gist.github.com/1986547
>This is just a simple custom solution I created. I also went back and
>built my own image verification system and tied it into this custom
>solution.
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
So, if i pass the username and password via restclient like this
res = RestClient::Resource.new url, :user_name => params[:name], :password => params[:password]. it will automatically convert into this format
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==....?????Plz give me a solution, i have been searching this doubt for 3 days....