class ApplicationController < ActionController::Base
  before_action :authorized
  protect_from_forgery with: :exception
  # helper_method :current_user
  # helper_method :logged_in?
  
  # def current_user
  # 	#User.find_by(id: session[:user_id])
  # 	User.find(id: session[:user_id])
  # end

  # def logged_in?
  # 	!current_user.nil?
  # end

  def authorized
  	#redirect_to '/welcome' unless logged_in?
  	authenticate_or_request_with_http_basic do |username, password|
    	username == "Biblio" && password == "RUMACCC_1"
  	end
  end

end
