app/controllers/application_controller.rb
def check_for_api_key
      if ['xml', 'json', 'jsonp'].include?(params[:format]) && request.headers['app_key'] == AppSetting.get_rest_api_key
        session[:cas_user] = Employee.first.uid 
      end
    end
# Checks to see if the request header contains the api key
Checks to see if the request header contains the api key
Checks to see if the request header contains the api key
def check_for_api_key
      if ['xml', 'json', 'jsonp'].include?(params[:format]) && request.headers['app_key'] == AppSetting.get_rest_api_key
        session[:cas_user] = Employee.first.uid 
      end
    end
def check_for_api_key if [ 'xml' , 'json' , 'jsonp' ] . include? ( params [ :format ] ) && request . headers [ 'app_key' ] == AppSetting . get_rest_api_key session [ :cas_user ] = Employee . first . uid end end
Checks to see if the request header contains the api key
Checks to see if the request header contains the api key