Skip to content

Instantly share code, notes, and snippets.

@timwco
Created February 13, 2011 03:20
Show Gist options
  • Save timwco/824398 to your computer and use it in GitHub Desktop.
Save timwco/824398 to your computer and use it in GitHub Desktop.
Authenticate HTTP Request
before_filter :httpauth
private
def httpauth
authenticate_or_request_with_http_basic do |user, password|
user == 'userName' && password == 'crazyLongPassword1234'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment