anchor.diff:  %% FLOW: ALL[5] OR 400
   %% Return whether the request is malformed.
   malformed_request(Req, State) ->
  -  OUkeyBin = cowboy_req:binding(oukey, Req, undefined),
  -
  -  case OUkeyBin =/= undefined of
  -    true ->
  -      OUkey = binary_to_list(OUkeyBin),
  -
  -      NewState = State#state{oukey = OUkey},
  -      {false, Req, NewState};
  -    fasle -> {true, Req, State}
  -  end.
  +  NewState = State#state{state = malformed_request},
  +  handle(Req, NewState).
   
   %% FLOW: ALL[6] OR 401
   %% Return whether the user is authorized to perform the action.
  -is_authorized(Req, State#state{oukey = OUkey}) ->
  -  case user_server:match_ouKey(OUkey) of
  -    {ok, Ukey} ->
  -      NewState = State#state{ukey = Ukey, isAuthorized = true},
  -      {true, Req, NewState};
  -    {error, _} -> {true, Req, State}
  -  end.
  -
  -%% FLOW: ALL[7] OR 403
  -%% Return whether access to the resource is forbidden.
  -forbidden(Req, State#state{isAuthorized = IsAuthorized}) ->
  -  {IsAuthorized, Req, State}.
  -
  -%% FLOW: ALL[8] OR 501
  -%% Return whether the content-* headers are valid.
  -valid_content_headers(Req, State) -> {true, Req, State}.
  -
  -%% FLOW: ALL[9] OR 413
  -%% Return whether the request body length is within acceptable boundaries.
  -valid_entity_length(Req, State) -> {true, Req, State}.
  +is_authorized(Req, State = #state{oukey = _OUkey}) ->
  +  NewState = State#state{state = is_authorized},
  +  handle(Req, NewState).
   
   %% FLOW: ALL[10], OPTIONS[0] THEN 200
   %% Handle a request for information.
  
positive.code: %%%-------------------------------------------------------------------
  %%% @author evangelosp
  %%% @copyright (C) 2014, <COMPANY>
  %%% @doc
  %%%
  %%% @end
  
negative.code: %% Return the list of content-types the resource provides.
  %% ProvideResource = iodata() | {stream, Fun} | {stream, Len, Fun} | {chunked, ChunkedFun}
  content_types_provided(Req, State) ->
    NewState = State#state{state = content_types_provided},
    {[{{<<"application">>, <<"json">>, '*'}, handle}], Req, NewState}.
  
  %% FLOW: ALL[14], GET[0], HEAD[0], POST[0], PUT[0], PATCH[0], DELETE[0]
  %% Return whether the resource exists.
  resource_exists(Req, State = #state{ukey = Ukey}) ->
    {Ukey =/= undefined, Req, State}.
  
  handle(Req, State = #state{method = <<"GET">>, state = malformed_request}) ->
    OUkeyBin = cowboy_req:binding(oukey, Req, undefined),
  
    case OUkeyBin =/= undefined of
      true ->
        OUkey = binary_to_list(OUkeyBin),
  
        NewState = State#state{oukey = OUkey},
        {false, Req, NewState};
      false -> {true, Req, State}
    end;
  
  handle(Req, State = #state{method = <<"GET">>, oukey = OUkey, state = is_authorized}) ->
    case user_server:match_ouKey(OUkey) of
      {ok, Ukey} ->
        NewState = State#state{ukey = Ukey, isAuthorized = true},
        {true, Req, NewState};
      {error, _} -> {false, Req, State}
    end;
  
  handle(Req, State = #state{method = <<"GET">>, ukey = Ukey, state = content_types_provided}) ->
  
    {ok, UProfile} = user_server:getuser(Ukey),
  
  