From b68f6cb66ec30f9e9ddd2724592e40ba0a3b22fb Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 15 Oct 2017 13:06:13 -0400 Subject: Integrated auth into main app Pokeviewer now expects the main app's ApplicationController to contain a method called "authenticate_pokeviewer" which will return true iff the username and token passed to it are valid. An example stub is present in the test dummy ApplicationController. --- test/dummy/app/controllers/application_controller.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/dummy/app/controllers/application_controller.rb') diff --git a/test/dummy/app/controllers/application_controller.rb b/test/dummy/app/controllers/application_controller.rb index 1c07694..95f36f8 100644 --- a/test/dummy/app/controllers/application_controller.rb +++ b/test/dummy/app/controllers/application_controller.rb @@ -1,3 +1,9 @@ class ApplicationController < ActionController::Base protect_from_forgery with: :exception + + protected + + def authenticate_pokeviewer(login, token) + login == "testuser" and token == "testpass" + end end -- cgit 1.4.1