amtest
amtest

Reputation: 700

rest http basic authorization with ruby

resource = RestClient::Resource.new('http://protected/resource', 'user', 'pass')

I have seen the above link, when i am serchng for http basic authentication with ruby. But my question is how to retreive and decode this user and pass for the login purpose?

Upvotes: 0

Views: 401

Answers (1)

Yanhao
Yanhao

Reputation: 5294

If you're going to implement the server end with Rails, http_basic_authenticate_with is what you are looking for. See ActionController::HttpAuthentication::Basic

Upvotes: 1

Related Questions