Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
auth_oauth2

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.
 
 auth_oauth2_pre_user_delete ($user)
 Callback to remove linked logins for deleted users.
 
 xmldb_auth_oauth2_upgrade ($oldversion)
 Upgrade function.
 

Variables

 $capabilities
 
 $observers
 
 $plugin = 2024041600
 
$plugin component = 'auth_oauth2'
 
$plugin version = 2024042200
 

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',
],
]