anchor.diff:  is_interesting({read_only_user_creds, _}) -> true;
   is_interesting(_) -> false.
   
  -handle_event(Event, State) ->
  -    case is_interesting(Event) of
  -        true ->
  -            {ok, maybe_notify_cbauth(State)};
  -        _ ->
  -            {ok, State}
  -    end.
  -
  -handle_call({ns_node_disco_events, _NodesBefore, _NodesAfter}, State) ->
  -    {ok, ok, maybe_notify_cbauth(State)};
  -handle_call({Msg, Label, Pid}, #state{rpc_processes = Processes,
  +handle_call(_Msg, _From, State) ->
  +    {reply, not_implemented, State}.
  +
  +handle_cast({Msg, Label, Pid}, #state{rpc_processes = Processes,
                                         cbauth_info = CBAuthInfo} = State) ->
       ?log_debug("Observed json rpc process ~p ~p", [{Label, Pid}, Msg]),
       Info = case CBAuthInfo of
  
positive.code: -module(menelaus_cbauth).
  
  -export([handle_cbauth_post/1]).
  -behaviour(gen_event).
  
  -export([start_link/0]).
  
  
  -export([init/1, handle_event/2, handle_call/2,
           handle_info/2, terminate/2, code_change/3]).
  
  -record(state, {cbauth_info = undefined, rpc_processes = []}).
  
negative.code:                                    Processes
                             end
                     end,
      {noreply, State#state{rpc_processes = NewProcesses,
                            cbauth_info = Info}}.
  
  handle_info(maybe_notify_cbauth, State) ->
      misc:flush(maybe_notify_cbauth),
      {noreply, maybe_notify_cbauth(State)};
  handle_info({'DOWN', MRef, _, Pid, Reason},
              #state{rpc_processes = Processes} = State) ->
      {value, {MRef, Label}, NewProcesses} = lists:keytake(MRef, 1, Processes),
      ?log_debug("Observed json rpc process ~p died with reason ~p", [{Label, Pid}, Reason]),
      {noreply, State#state{rpc_processes = NewProcesses}};
  
  handle_info(_Info, State) ->
      {noreply, State}.
  
  maybe_notify_cbauth(#state{rpc_processes = Processes,
                             cbauth_info = CBAuthInfo} = State) ->
  