MDL-58219 cibot: Fixes
Fixes for cibot warnings. Part of MDL-58220
This commit is contained in:
@@ -242,7 +242,7 @@ class api {
|
||||
* Get the system account for an installed OAuth service.
|
||||
* Never ever ever expose this to a webservice because it contains the refresh token which grants API access.
|
||||
*
|
||||
* @param \core\oauth2\issuer $id
|
||||
* @param \core\oauth2\issuer $issuer
|
||||
* @return \core\oauth2\client
|
||||
*/
|
||||
public static function get_system_account(issuer $issuer) {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/**
|
||||
* Configurable oauth2 client class.
|
||||
*
|
||||
* @package core\oauth2
|
||||
* @package core
|
||||
* @copyright 2017 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/**
|
||||
* Class for loading/storing oauth2 endpoints from the DB.
|
||||
*
|
||||
* @package core_oauth2
|
||||
* @package core
|
||||
* @copyright 2017 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
@@ -36,7 +36,6 @@ use lang_string;
|
||||
*/
|
||||
class endpoint extends persistent {
|
||||
|
||||
/** @const TABLE */
|
||||
const TABLE = 'oauth2_endpoint';
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/**
|
||||
* Class for loading/storing issuers from the DB.
|
||||
*
|
||||
* @package core_oauth2
|
||||
* @package core
|
||||
* @copyright 2017 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
@@ -35,7 +35,6 @@ use core\persistent;
|
||||
*/
|
||||
class issuer extends persistent {
|
||||
|
||||
/** @const TABLE */
|
||||
const TABLE = 'oauth2_issuer';
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,12 +21,18 @@
|
||||
* @copyright 2017 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
namespace core\oauth2;
|
||||
|
||||
use \core\task\scheduled_task;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
/**
|
||||
* Simple task to delete old messaging records.
|
||||
* @package core
|
||||
* @copyright 2017 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class refresh_system_tokens_task extends scheduled_task {
|
||||
|
||||
@@ -47,7 +53,7 @@ class refresh_system_tokens_task extends scheduled_task {
|
||||
$admins = get_admins();
|
||||
|
||||
if (empty($admins)) {
|
||||
return;
|
||||
return;
|
||||
}
|
||||
foreach ($admins as $admin) {
|
||||
$strparams = ['siteurl' => $CFG->wwwroot, 'issuer' => $issuer->get('name')];
|
||||
|
||||
@@ -63,6 +63,7 @@ abstract class rest {
|
||||
*
|
||||
* @param string $functionname
|
||||
* @param array $functionargs
|
||||
* @param string $rawpost Optional param to include in the body of a post.
|
||||
*/
|
||||
public function call($functionname, $functionargs, $rawpost = false) {
|
||||
$functions = $this->get_api_functions();
|
||||
|
||||
@@ -16,10 +16,8 @@
|
||||
|
||||
/**
|
||||
* When using OAuth sometimes it makes sense to authenticate as a system user, and not the current user.
|
||||
* In this case we use a refresh token to get an access token and the system admin must manually authorize the
|
||||
* system account.
|
||||
*
|
||||
* @package core_oauth2
|
||||
* @package core
|
||||
* @copyright 2017 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
@@ -37,7 +35,6 @@ use core\persistent;
|
||||
*/
|
||||
class system_account extends persistent {
|
||||
|
||||
/** @const TABLE */
|
||||
const TABLE = 'oauth2_system_account';
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/**
|
||||
* Class for loading/storing oauth2 endpoints from the DB.
|
||||
*
|
||||
* @package core_oauth2
|
||||
* @package core
|
||||
* @copyright 2017 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
@@ -35,7 +35,6 @@ use core\persistent;
|
||||
*/
|
||||
class user_field_mapping extends persistent {
|
||||
|
||||
/** @const TABLE */
|
||||
const TABLE = 'oauth2_user_field_mapping';
|
||||
|
||||
/** @var array $userfields - List of standard Moodle userfields. */
|
||||
|
||||
Reference in New Issue
Block a user