anchor.diff:    "users".
   
   allowed_methods(Req, State) ->
  -    io:format("~nchef_wm_verify_password:allowed_methods()~n"),
     {['POST'], Req, State}.
   
  -validate_request('POST', Req, State) ->
  +validate_request('POST', Req, #base_state{resource_state = UserState} = State) ->
     case wrq:req_body(Req) of
  -    undefined ->
  -      throw({error, missing_body});
  -   Body ->
  -      %% TODO: Placeholder
  -      UserData = ejson:decode(Body),
  -      {Req, State#base_state{resource_state =
  -          #user_state{user_data = UserData}}}
  +      undefined ->
  +          throw({error, missing_body});
  +      Body ->
  +          UserData = ejson:decode(Body),
  +          case ej:valid(valid_user_data(), UserData) of
  +              ok ->
  +                  UserState1 = UserState#user_state{user_data = UserData},
  +                  {Req, State#base_state{resource_state = UserState1}};
  +              Bad ->
  +                  throw(Bad)
  +          end
     end.
  +
  +valid_user_data() ->
  +    {[{<<"name">>, string},
  +      {<<"password">>, string}]}.
   
   %% Create, destroy, and update are admin only actions
   %% Need to update this to reflect that, as right now it
  
positive.code: auth_info(Req, State) ->
    {authorized, Req, State}.
  
  %% If we get here, are we guarenteed the user exists?
  resource_exists(Req, State) ->
    {true, Req, State}.
  
  from_json(Req, #base_state{reqid = RequestId,
                             resource_state = #user_state{user_data = UserData,
                             user_authz_id = AuthzId}} = State) ->
      Name = ej:get({<<"name">>}, UserData),
      Ejson = {[{<<"name">>, Name},
              {<<"verified">>, true}
          ]},
      {true, chef_wm_util:set_json_body(Req, Ejson), State}.
  
  process_post(Req, #base_state{reqid = RequestId,
                             resource_state = #user_state{user_data = UserData,
                             user_authz_id = AuthzId}} = State) ->
      Name = ej:get({<<"name">>}, UserData),
      Ejson = {[{<<"name">>, Name},
              {<<"verified">>, true}
          ]},
      {true, chef_wm_util:set_json_body(Req, Ejson), State}.
  
  
negative.code: 
  -include("chef_wm.hrl").
  
  -mixin([{chef_wm_base, [content_types_provided/2,
                          finish_request/2,
                          malformed_request/2,
                          ping/2 ]}]).
  