diff options
author | Azul <azul@leap.se> | 2014-02-10 14:34:17 +0100 |
---|---|---|
committer | Azul <azul@leap.se> | 2014-02-10 14:59:01 +0100 |
commit | b6c8279a39f933257be11fc29f5b7d59efff743f (patch) | |
tree | 3f453e310194e25e11ed09489f2cc4b37b27d5b4 | |
parent | 3a478804aa48b08fbeded5144677744c427c112f (diff) |
require_token now checks for token and login
-rw-r--r-- | users/app/controllers/controller_extension/token_authentication.rb | 4 |
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 |