Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Files | Namespaces | Classes | Functions | Variables
auth_oauth2

Files

file  access.php
 Capability definitions for this plugin.
 
file  api.php
 Class for loading/storing oauth2 linked logins from the DB.
 
file  auth.php
 Open ID authentication.
 
file  auth.php
 Anobody can login with any password.
 
file  events.php
 This file definies observers needed by the plugin.
 
file  lib.php
 Callbacks for auth_oauth2.
 
 
file  provider.php
 Privacy class for requesting user data for auth_oauth2.
 
file  renderer.php
 Output rendering for the plugin.
 
file  settings.php
 Admin settings and defaults.
 
file  upgrade.php
 OAuth2 authentication plugin upgrade code.
 
file  version.php
 Version information.
 

Namespaces

namespace  auth_oauth2
  
 
namespace  auth_oauth2\output
  
 
namespace  auth_oauth2\privacy
  
 

Classes

class  auth_oauth2\api
 Static list of api methods for auth oauth2 configuration. More...
 
class  auth_oauth2\auth
 Plugin for oauth2 authentication. More...
 
class  auth_oauth2\linked_login
 Class for loading/storing issuer from the DB. More...
 
class  auth_oauth2\output\renderer
 Implements the plugin renderer. More...
 
class  auth_oauth2\privacy\provider
 Privacy provider for auth_oauth2. More...
 
class  auth_plugin_oauth2
 Plugin for oauth2 authentication. More...
 

Functions

 auth_oauth2_extend_navigation_user_settings (navigation_node $useraccount, stdClass $user, context_user $context, stdClass $course, context_course $coursecontext)
 Navigation hook to add to preferences page. More...
 
 auth_oauth2_pre_user_delete ($user)
 Callback to remove linked logins for deleted users. More...
 
 xmldb_auth_oauth2_upgrade ($oldversion)
 Upgrade function. More...
 

Variables

 $capabilities
 
 $observers
 
 $plugin = 2020060900
 
$plugin component = 'auth_oauth2'
 
$plugin version = 2020061500
 

Detailed Description

Function Documentation

◆ auth_oauth2_extend_navigation_user_settings()

auth_oauth2_extend_navigation_user_settings ( navigation_node  $useraccount,
stdClass  $user,
context_user  $context,
stdClass  $course,
context_course  $coursecontext 
)

Navigation hook to add to preferences page.

Parameters
navigation_node$useraccount
stdClass$user
context_user$context
stdClass$course
context_course$coursecontext

◆ auth_oauth2_pre_user_delete()

auth_oauth2_pre_user_delete (   $user)

Callback to remove linked logins for deleted users.

Parameters
stdClass$user

◆ xmldb_auth_oauth2_upgrade()

xmldb_auth_oauth2_upgrade (   $oldversion)

Upgrade function.

Parameters
int$oldversionthe version we are upgrading from
Return values
boolresult

Variable Documentation

◆ $capabilities

$capabilities
Initial value:
= [
'auth/oauth2:managelinkedlogins' => array(
'captype' => 'write',
'contextlevel' => CONTEXT_USER,
'archetypes' => array(
'user' => CAP_ALLOW
)
),
]
const CONTEXT_USER
User context level - one instance for each user describing what others can do to user.
Definition: accesslib.php:124
const CAP_ALLOW
Allow permission, overrides CAP_PREVENT defined in parent contexts.
Definition: accesslib.php:115

◆ $observers

$observers
Initial value:
= [
[
'eventname' => '\core\event\user_deleted',
'callback' => '\auth_oauth2\api::user_deleted',
],
]