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.

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

(no description)

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

Defines 1 class


Class: OAuthServer  - X-Ref

Class to represent an %OAuth Server

__construct($data_store)   X-Ref
No description

add_signature_method($signature_method)   X-Ref
No description

fetch_request_token(&$request)   X-Ref
process a request_token request
returns the request token on success


fetch_access_token(&$request)   X-Ref
process an access_token request
returns the access token on success


verify_request(&$request)   X-Ref
verify an api call, checks all the parameters


get_version(&$request)   X-Ref
version 1


get_signature_method($request)   X-Ref
figure out the signature with some defaults


get_consumer($request)   X-Ref
try to find the consumer for the provided request's consumer key


get_token($request, $consumer, $token_type="access")   X-Ref
try to find the token for the provided request's token key


check_signature($request, $consumer, $token)   X-Ref
all-in-one function to check the signature on a request
should guess the signature method appropriately


check_timestamp($timestamp)   X-Ref
check that the timestamp is new enough


check_nonce($consumer, $token, $nonce, $timestamp)   X-Ref
check that the nonce is not repeated