Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

This file contains a Trivial memory-based store - no support for tokens

Author: Charles Severance csev@umich.edu
Copyright: IMS Global Learning Consortium
License: http://www.apache.org/licenses/LICENSE-2.0
File Size: 139 lines (5 kb)
Included or required:0 times
Referenced: 2 times
Includes or requires: 0 files

Defines 1 class

TrivialOAuthDataStore:: (6 methods):
  add_consumer()
  lookup_consumer()
  lookup_token()
  lookup_nonce()
  new_request_token()
  new_access_token()


Class: TrivialOAuthDataStore  - X-Ref

A Trivial memory-based store - no support for tokens.

add_consumer($consumerkey, $consumersecret)   X-Ref
Add a consumer to the array

param: string $consumerkey     Consumer key
param: string $consumersecret  Consumer secret

lookup_consumer($consumerkey)   X-Ref
Get OAuth consumer given its key

param: string $consumerkey     Consumer key
return: moodle\mod\lti\OAuthConsumer  OAuthConsumer object

lookup_token($consumer, $tokentype, $token)   X-Ref
Create a dummy OAuthToken object for a consumer

param: moodle\mod\lti\OAuthConsumer $consumer     Consumer
param: string $tokentype    Type of token
param: string $token        Token ID
return: moodle\mod\lti\OAuthToken OAuthToken object

lookup_nonce($consumer, $token, $nonce, $timestamp)   X-Ref
Nonce values are not checked so just return a null

param: moodle\mod\lti\OAuthConsumer $consumer     Consumer
param: string $token        Token ID
param: string $nonce        Nonce value
param: string $timestamp    Timestamp
return: null

new_request_token($consumer)   X-Ref
Tokens are not used so just return a null.

param: moodle\mod\lti\OAuthConsumer $consumer     Consumer
return: null

new_access_token($token, $consumer)   X-Ref
Tokens are not used so just return a null.

param: string $token        Token ID
param: moodle\mod\lti\OAuthConsumer $consumer     Consumer
return: null