Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

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

(no description)

File Size: 126 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

OAuthDataStore:: (6 methods):
  __construct()
  lookup_consumer()
  lookup_token()
  lookup_nonce()
  new_request_token()
  new_access_token()


Class: OAuthDataStore  - X-Ref

Class to represent an OAuth datastore

__construct($toolProvider)   X-Ref
Class constructor.

param: ToolProvider $toolProvider Tool_Provider object

lookup_consumer($consumerKey)   X-Ref
Create an OAuthConsumer object for the tool consumer.

param: string $consumerKey Consumer key value
return: OAuthConsumer OAuthConsumer object

lookup_token($consumer, $tokenType, $token)   X-Ref
Create an OAuthToken object for the tool consumer.

param: string $consumer   OAuthConsumer object
param: string $tokenType  Token type
param: string $token      Token value
return: OAuthToken OAuthToken object

lookup_nonce($consumer, $token, $value, $timestamp)   X-Ref
Lookup nonce value for the tool consumer.

param: OAuthConsumer $consumer  OAuthConsumer object
param: string        $token     Token value
param: string        $value     Nonce value
param: string        $timestamp Date/time of request
return: boolean True if the nonce value already exists

new_request_token($consumer, $callback = null)   X-Ref
Get new request token.

param: OAuthConsumer $consumer  OAuthConsumer object
param: string        $callback  Callback URL
return: string Null value

new_access_token($token, $consumer, $verifier = null)   X-Ref
Get new access token.

param: string        $token     Token value
param: OAuthConsumer $consumer  OAuthConsumer object
param: string        $verifier  Verification code
return: string Null value