Uploaded image for project: 'Moodle Community Sites'
  1. Moodle Community Sites
  2. MDLSITE-5240

Customer OAuth 2.0 Server - Missing Token

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: dev.moodle.org
    • Labels:
      None

      Description

      /lib/classes/oauth2/client.php 

      Method get_userinfo

      When requesting user information a token is required to authenticate any request. Currently, there is only a request to the userinfo endpoint assigned in the settings. The snippet below is  a suggestion but does use a querystring. Bearer token should also be supported.

      // Suggested edit around line 247 in /lib/classes/oauth2/client.php 
      $accesstoken = $this->get_accesstoken();
      $params = array(
         'access_token' => $accesstoken->token
      );
      $response = $this->get( $url, $params );
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            dash10digital Justin Greer
            Participants:
            Component watchers:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: