anchor.diff:                          {ok, _} ->
                               Struct = {struct, [
                                   {access_token, AccToken},
  -                                {refresh_token, RefreshT}
  +                                {refresh_token, RefToken}
                               ]},
                               Res = mochijson2:encode(Struct),
                               {true, Res}
  
positive.code: 
  -spec auth_gen_token(Code::string(), AuthState::string()) -> string().
  auth_gen_token(Code, AuthState) ->
      {AccToken, RefToken} = exchange_token(Code, AuthState),
  
      RefreshT = case RefToken of
          undefined -> list_to_binary("undefined");
          String    -> list_to_binary(string:substr(binary_to_list(String), 3))
      end,
  
negative.code: 
  
  -spec authenticate_request(ReqData::tuple()) -> tuple().
  authenticate_request(ReqData) -> authenticate_token("Access-Token", ReqData).
  
  
  -spec authenticate_token(TokenName::string(), ReqData::tuple()) -> tuple().
  authenticate_token(TokenName, ReqData) ->
      case wrq:get_req_header(TokenName, ReqData) of
          undefined -> {error, "{\"error\": \"Not possible to perform the request. Missing " ++ TokenName ++ "\"}"};
          TokenVal  -> check_valid_token(TokenName, TokenVal)
      end.
  
  
  