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.

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