blob: 06e9e0463f3a55e9090f7b72ab3e5e2f0197f5bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
module ControllerExtension::TokenAuthentication
extend ActiveSupport::Concern
def token_authenticate
authenticate_or_request_with_http_token do |token_id, options|
@token = Token.find(token_id)
end
User.find_by_param(@token.user_id) if @token
end
end
|