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.

Differences Between: [Versions 400 and 403] [Versions 401 and 403] [Versions 402 and 403]

(no description)

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

Defines 1 class

LtiOidcLogin:: (5 methods):
  __construct()
  new()
  doOidcLoginRedirect()
  validateOidcLogin()
  secureRandomString()


Class: LtiOidcLogin  - X-Ref

__construct(IDatabase $database, ICache $cache = null, ICookie $cookie = null)   X-Ref
Constructor.

param: IDatabase  $database Instance of the Database interface used for looking up registrations and deployments
param: ICache  $cache    instance of the Cache interface used to loading and storing launches
param: ICookie  $cookie   instance of the Cookie interface used to set and read cookies

new(IDatabase $database, ICache $cache = null, ICookie $cookie = null)   X-Ref
Static function to allow for method chaining without having to assign to a variable first.


doOidcLoginRedirect($launch_url, array $request = null)   X-Ref
Calculate the redirect location to return to based on an OIDC third party initiated login request.

param: string  $launch_url URL to redirect back to after the OIDC login. This URL must match exactly a URL white listed in the platform.
param: array|string  $request    An array of request parameters. If not set will default to $_REQUEST.
return: Redirect returns a redirect object containing the fully formed OIDC login URL

validateOidcLogin($request)   X-Ref
No description

secureRandomString(string $prefix = '')   X-Ref
No description