def authenticate_using_http_basic
    return if current_user
    authenticate_with_http_basic do |email, password|
      signin = Session.new email: email, password: password
      auth = User.authenticate_signin signin
      self.current_user = auth unless auth.kind_of? Symbol
    end
  end
def authenticate_using_http_basic
    return if current_user
    authenticate_with_http_basic do |email, password|
      signin = Session.new email: email, password: password
      auth = User.authenticate_signin signin
      self.current_user = auth unless auth.kind_of? Symbol
    end
  end
The before_action that implements authenticates_using_http_basic.

 If your ApplicationController contains authenticates_using_http_basic, you
 can opt out in individual controllers using skip_before_action.

     skip_before_action :authenticate_using_http_basic