Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

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

(no description)

File Size: 133 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. If non is provided launch data will be store in $_SESSION.
param: ICookie   $cookie   Instance of the Cookie interface used to set and read cookies. Will default to using $_COOKIE and setcookie.

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