anchor.diff:  -include_lib("lager/include/log.hrl").
   
   init() ->
  -    ?debug("    authorize_rpc:init(): called"),
  +    ?debug("authorize_rpc:init(): called"),
       case rvi_common:get_component_config(authorize, exo_http_opts) of
   	{ ok, ExoHttpOpts } ->
   	    exoport_exo_http:instance(authorize_sup, 
  
positive.code:      ]
      }.
  
  authorize_local_message(Target, CallingService) ->
      ?debug("    authorize_rpc:authorize_local_msg(): target: ~p ~n", [Target]),
      ?debug("    authorize_rpc:authorize_local_msg(): calling_service: ~p ~n", [CallingService]),
      {ok, 
       [ 
         { status, rvi_common:json_rpc_status(ok)},
         { signature, "fixme_add_signature" },
  %%       { certificate, get_certificate_body(CallingService, Target) }
         { certificate, "certificate"  }
       ]}.
  
  authorize_remote_message(Target, Signature, Certificate) ->
      ?debug("    authorize_rpc:authorize_remote_msg(): target: ~p ~n", [Target]),
      ?debug("    authorize_rpc:authorize_remote_msg(): signature: ~p ~n", [Signature]),
      ?debug("    authorize_rpc:authorize_remote_msg(): certificate: ~p ~n", [Certificate]),
      {ok, 
       [ 
         { status, rvi_common:json_rpc_status(ok) },
  
negative.code: %% JSON-RPC entry point
  %% CAlled by local exo http server
  handle_rpc("authorize_local_message", Args) ->
      {ok, ServiceName} = rvi_common:get_json_element(["service_name"], Args),
      {ok, CallingService} = rvi_common:get_json_element(["calling_service"], Args),
      authorize_local_message(ServiceName, CallingService);
  
  handle_rpc("authorize_remote_message", Args) ->
      {ok, ServiceName} = rvi_common:get_json_element(["service_name"], Args),
      {ok, Signature} = rvi_common:get_json_element(["signature"], Args),
      {ok, Certificate} = rvi_common:get_json_element(["certificate"], Args),
      authorize_remote_message(ServiceName , Signature, Certificate);
  
  handle_rpc(Other, _Args) ->
      ?debug("authorize_rpc:handle_rpc(~p): unknown", [ Other ]),
      { ok, [ { status, rvi_common:json_rpc_status(invalid_command)} ] }.
  