Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 and 403] [Versions 401 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  #[\AllowDynamicProperties]
  13  class OAuthDataStore {
  14      function lookup_consumer($consumer_key) {
  15          // implement me
  16      }
  17  
  18      function lookup_token($consumer, $token_type, $token) {
  19          // implement me
  20      }
  21  
  22      function lookup_nonce($consumer, $token, $nonce, $timestamp) {
  23          // implement me
  24      }
  25  
  26      function new_request_token($consumer, $callback = null) {
  27          // return a new token attached to this consumer
  28      }
  29  
  30      function new_access_token($token, $consumer, $verifier = null) {
  31          // return a new access token attached to this consumer
  32          // for the user associated with this token if the request token
  33          // is authorized
  34          // should also invalidate the request token
  35      }
  36  
  37  }