Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-59992

webservice_login_failed event produces notices in error.log

    XMLWordPrintable

Details

    • MOODLE_32_STABLE, MOODLE_33_STABLE
    • MOODLE_32_STABLE, MOODLE_33_STABLE
    • wip-MDL-59992-master
    • Hide
      1. Enable developers debugging
      2. Enable WS on the site and REST protocol
      3. Request URL (in browser or curl): http://YOURMOODLESITE/webservice/rest/server.php?moodlewsrestformat=json&get_site_info&wstoken=qwerty
      4. There should be no notices in error.log and the response should look like:

        {"exception":"moodle_exception","errorcode":"invalidtoken","message":"Invalid token - token not found"}
        

      Check logs report - event webservice_login_failed should be logged

      Show
      Enable developers debugging Enable WS on the site and REST protocol Request URL (in browser or curl): http://YOURMOODLESITE/webservice/rest/server.php?moodlewsrestformat=json&get_site_info&wstoken=qwerty There should be no notices in error.log and the response should look like: {"exception":"moodle_exception","errorcode":"invalidtoken","message":"Invalid token - token not found"} Check logs report - event webservice_login_failed should be logged

    Description

      When WS authentication fails I can see in error.log:

      Debugging: Context was already set in init() method, ignoring context parameter in 
      * line 214 of /lib/classes/event/base.php: call to debugging()
      * line 1053 of /webservice/lib.php: call to core\\event\\base::create()
      * line 939 of /webservice/lib.php: call to webservice_server->authenticate_by_token()
      * line 1203 of /webservice/lib.php: call to webservice_server->authenticate_user()
      * line 44 of /webservice/rest/server.php: call to webservice_base_server->run()
      

      Attachments

        Activity

          People

            marina Marina Glancy
            marina Marina Glancy
            David Monllaó David Monllaó
            Dan Poltawski Dan Poltawski
            Adrian Greeve Adrian Greeve
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Juan Leyva, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Sep/17