File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ class BaseApiController < ApplicationController # rubocop:todo Style/Documentati
99 # call doorkeeper to authorize the request
1010 before_action :doorkeeper_authorize! , except : %i[ heartbeat ]
1111 # get details of server (e.g. DMPonline) and client app
12- before_action :get_client_and_server_details
12+ before_action :base_response_content
1313
1414 before_action :log_access
1515
@@ -36,15 +36,17 @@ def me
3636 # define instance variable json and associated getter and setter methods
3737 attr_accessor :json
3838
39- def get_client_and_server_details
39+ def base_response_content
4040 @application = ApplicationService . application_name
4141 @caller = request . remote_ip if @client . blank?
4242 @caller = @client . is_a? ( User ) ? @client . name ( false ) : @client . name if @client . present?
4343 end
4444
4545 def log_access
46- Rails . logger . info "Client (OAuth) application name: #{ @client . name } " if @client . present?
47- Rails . logger . info "Client (OAuth) application uid: #{ @client . uid } " if @client . present?
46+ if @client . present?
47+ Rails . logger . info "Client (OAuth) application name: #{ @client . name } "
48+ Rails . logger . info "Client (OAuth) application uid: #{ @client . uid } "
49+ end
4850 Rails . logger . info "Resource owner id: #{ @resource_owner . id } " if @resource_owner
4951 end
5052
Original file line number Diff line number Diff line change 5858 # enable ssl requirement for redirect url
5959 force_ssl_in_redirect_uri true
6060end
61- end
You can’t perform that action at this time.
0 commit comments