Search moodle.org's
Developer Documentation

See Release Notes

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

Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 401 and 402]

   1  <?php
   2  
   3  namespace IMSGlobal\LTI\OAuth;
   4  
   5  /**
   6   * Class to represent an %OAuth Consumer
   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 OAuthConsumer {
  14  
  15      public $key;
  16      public $secret;
  17  
  18      function __construct($key, $secret, $callback_url=NULL) {
  19          $this->key = $key;
  20          $this->secret = $secret;
  21          $this->callback_url = $callback_url;
  22      }
  23  
  24      function __toString() {
  25          return "OAuthConsumer[key=$this->key,secret=$this->secret]";
  26      }
  27  
  28  }