anchor.diff:              case api_help:is_auth_redirect(ReqData) of
                   true  -> process_auth_redirect(ReqData, State);
                   false ->
  -                    case openidc:authenticate_token("refresh_token", ReqData) of
  -                        {ok, _} -> Do_get_user();
  -                        {error, _} ->
  -                            case openidc:authenticate_token("access_token", ReqData) of
  +                    % case openidc:authenticate_token("refresh_token", ReqData) of
  +                    %     {ok, _} -> Do_get_user();
  +                    %     {error, _} ->
  +                            case openidc:authenticate_request(ReqData) of
                                   {ok, _} -> Do_get_user();
  -                                {error, Msg} ->
  -                                    Error = "{\"error\": \"" ++ Msg ++ "\"}",
  -                                    {{halt, 403}, wrq:set_resp_body(Error, ReqData), State}
  +                                {error, Msg} -> {{halt, 403}, wrq:set_resp_body(Msg, ReqData), State}
                               end
  -                    end
  +                    % end
               end
       end.
   
  
positive.code:     end.
  
  
  -spec replace_access_token(Username::string(), AccToken::string()) -> tuple().
  replace_access_token(Username, AccToken) ->
      case get_user_by_name(Username) of
          {error, Msg} -> {error, Msg};
          {ok, JSON}   ->
              UserJSON = lib_json:replace_field(JSON, "access_token", AccToken),
              Update   = lib_json:set_attr(doc, UserJSON),
              case api_help:update_doc(?INDEX, "user", Username, Update) of
                  {ok, NewJSON}         -> {ok, NewJSON};
  
negative.code:          process_post/2,
           process_auth_request/2,
           delete_streams_with_user_id/1,
           replace_token/3,
           user_is_new/1,
           store_user/3,
           get_user_by_name/1]).
  