From b6c8279a39f933257be11fc29f5b7d59efff743f Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 10 Feb 2014 14:34:17 +0100 Subject: require_token now checks for token and login --- users/app/controllers/controller_extension/token_authentication.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/users/app/controllers/controller_extension/token_authentication.rb b/users/app/controllers/controller_extension/token_authentication.rb index ee24f73..6e0a6ce 100644 --- a/users/app/controllers/controller_extension/token_authentication.rb +++ b/users/app/controllers/controller_extension/token_authentication.rb @@ -8,11 +8,11 @@ module ControllerExtension::TokenAuthentication end def token_authenticate - token.authenticate if token + @token_authenticated ||= token.authenticate if token end def require_token - access_denied unless token + access_denied unless token_authenticate end def logout -- cgit v1.2.3