summaryrefslogtreecommitdiff
path: root/users/app/controllers
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-02-10 14:34:17 +0100
committerAzul <azul@leap.se>2014-02-10 14:59:01 +0100
commitb6c8279a39f933257be11fc29f5b7d59efff743f (patch)
tree3f453e310194e25e11ed09489f2cc4b37b27d5b4 /users/app/controllers
parent3a478804aa48b08fbeded5144677744c427c112f (diff)
require_token now checks for token and login
Diffstat (limited to 'users/app/controllers')
-rw-r--r--users/app/controllers/controller_extension/token_authentication.rb4
1 files 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