Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 402] [Versions 400 and 403]

   1  <?php
   2  
   3  namespace IMSGlobal\LTI\OAuth;
   4  
   5  /**
   6   * Class to represent an %OAuth Data Store
   7   *
   8   * @copyright  Andy Smith
   9   * @version 2008-08-04
  10   * @license https://opensource.org/licenses/MIT The MIT License
  11   */
  12  class OAuthDataStore {
  13      function lookup_consumer($consumer_key) {
  14          // implement me
  15      }
  16  
  17      function lookup_token($consumer, $token_type, $token) {
  18          // implement me
  19      }
  20  
  21      function lookup_nonce($consumer, $token, $nonce, $timestamp) {
  22          // implement me
  23      }
  24  
  25      function new_request_token($consumer, $callback = null) {
  26          // return a new token attached to this consumer
  27      }
  28  
  29      function new_access_token($token, $consumer, $verifier = null) {
  30          // return a new access token attached to this consumer
  31          // for the user associated with this token if the request token
  32          // is authorized
  33          // should also invalidate the request token
  34      }
  35  
  36  }