app/controllers/ecds_rails_auth_engine/current_user.rb
#
# Return the User object for the user making the request
#
# @return [User] <description>
#
Return the User object for the user making the request
Return the User object for the user making the request
def current_user
        a = request.headers['Authorization']
        begin
          token = a.split(' ').last
          login = Login.where(oauth2_token: token)
          login.present? ? login.first.user : User.new
        rescue NoMethodError
          User.new
        end
      end
def current_user a = request . headers [ 'Authorization' ] begin token = a . split ( ' ' ) . last login = Login . where ( oauth2_token : token ) login . present? ? login . first . user : User . new rescue NoMethodError User . new end end
Return the User object for the user making the request
Return the User object for the user making the request
None
User