SpeciesFileGroup/taxonworks

View on GitHub
app/controllers/concerns/api/authenticate_user_token.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Api

  # See AuthenticateProjectToken for documentation
  module AuthenticateUserToken 

    extend ActiveSupport::Concern
    
    include ActionController::HttpAuthentication::Token::ControllerMethods
    include TokenAuthentication

    included do
      before_action :intercept_user, if: -> { params[:authenticate_user] }
    end

  end
end