summaryrefslogtreecommitdiff
path: root/app/controllers/controller_extension/token_authentication.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/controller_extension/token_authentication.rb')
-rw-r--r--app/controllers/controller_extension/token_authentication.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/controller_extension/token_authentication.rb b/app/controllers/controller_extension/token_authentication.rb
index b0ed624..4ad1977 100644
--- a/app/controllers/controller_extension/token_authentication.rb
+++ b/app/controllers/controller_extension/token_authentication.rb
@@ -1,6 +1,8 @@
module ControllerExtension::TokenAuthentication
extend ActiveSupport::Concern
+ protected
+
def token
@token ||= authenticate_with_http_token do |token, options|
Token.find_by_token(token)
@@ -12,7 +14,7 @@ module ControllerExtension::TokenAuthentication
end
def require_token
- access_denied unless token_authenticate
+ login_required unless token_authenticate
end
def logout