anchor.diff:      ClientState1 = ClientState#client_state{chef_client = Client},
       {Req, State#base_state{resource_state = ClientState1}}.
   
  -validate_request('PUT', Req, State) ->
  -    {Req1, State1} = validate_any_request(Req, State),
  -    #base_state{resource_state =
  -                    #client_state{chef_client = OldClient} = ClientState} = State1,
  -    case OldClient of
  -        not_found ->
  -            {Req1, State1};
  -        _ ->
  -            % FIXME: parse_binary_json can probably be simplified to NOT need a
  -            % name passed to it; the name extracted from the old client here is
  -            % the same as the request name, since the request name is used to pull
  -            % the old client from the database in the first place.
  -            #chef_client{name = Name} = OldClient,
  -            Body = wrq:req_body(Req),
  -            {ok, ClientData} = chef_client:parse_binary_json(Body, Name, OldClient),
  -            {Req1, State1#base_state{resource_state =
  -                                         ClientState#client_state{client_data =
  -                                                                      ClientData}}}
  -    end;
  -validate_request(_Other, Req, State) ->
  -    validate_any_request(Req, State).
  -
   %% This should never get called.
   auth_info(Req, State) ->
       {{halt, 404}, Req, State}.
  -
  -set_http_response_code(Name, ReqName, Uri, Request) ->
  -    % If this is a rename, we need to add the Location header so it returns 201
  -    case ReqName of
  -        Name ->
  -            Request;
  -        _ ->
  -            wrq:set_resp_header("Location", binary_to_list(Uri), Request)
  -    end.
   
   to_json(Req, #base_state{resource_state =
                                #client_state{chef_client = Client},
  
positive.code: %%
  
  
  -module(chef_wm_pubkey).
  
  -include("chef_wm.hrl").
  
  
negative.code:          forbidden/2,
           is_authorized/2,
           allowed_methods/2,
           to_json/2
         ]).
  
  