ruebenramirez / blog

My blog
http://blog.ruebenramirez.com/
7 stars 0 forks source link

http basic auth in rails-api gem #301

Open ruebenramirez opened 8 years ago

ruebenramirez commented 8 years ago

http://stackoverflow.com/a/37120033

class ApplicationController < ActionController::API
  include ActionController::HttpAuthentication::Basic::ControllerMethods
  http_basic_authenticate_with name: "username", password: "passwd123"