summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-03-20 01:13:24 -0700
committerelijah <elijah@riseup.net>2016-03-28 16:03:54 -0700
commitc63791c7ffacb7c6cfc685e2654ffe66f0a6b185 (patch)
treebe68b1c5906d06f2669e102d99ea6ca02b7d2856 /app/controllers
parentef5f9636863a8bddb704714027c6540dc5a0b781 (diff)
api tokens: allow for special api tokens that work like session tokens but are configured in the static config, to be used for infrastructure monitoring.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/controller_extension/token_authentication.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/controller_extension/token_authentication.rb b/app/controllers/controller_extension/token_authentication.rb
index 4ad1977..15ddef7 100644
--- a/app/controllers/controller_extension/token_authentication.rb
+++ b/app/controllers/controller_extension/token_authentication.rb
@@ -5,7 +5,7 @@ module ControllerExtension::TokenAuthentication
def token
@token ||= authenticate_with_http_token do |token, options|
- Token.find_by_token(token)
+ Token.find_by_token(token) || ApiToken.find_by_token(token)
end
end