Skip to content

Instantly share code, notes, and snippets.

@between40and2
Created June 23, 2014 09:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save between40and2/f7bde720ab316391f750 to your computer and use it in GitHub Desktop.
Save between40and2/f7bde720ab316391f750 to your computer and use it in GitHub Desktop.
HTTP Basic/Digest Auth in Rails

ActionController::HttpAuthentication::Basic::ControllerMethods

  • authenticate_or_request_with_http_basic(realm = "Application", &login_procedure)
  • authenticate_with_http_basic(&login_procedure)
  • request_http_basic_authentication(realm = "Application")

ActionController::HttpAuthentication::Digest::ControllerMethods

  • authenticate_or_request_with_http_digest(realm = "Application", &password_procedure)
  • authenticate_with_http_digest(realm = "Application", &password_procedure)
  • request_http_digest_authentication(realm = "Application", message = nil)

ActionController::HttpAuthentication::Digest

  • authenticate(request, realm, &password_procedure)

refs

http://api.rubyonrails.org/files/actionpack/lib/action_controller/metal/http_authentication_rb.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment