Static list of api methods for auth oauth2 configuration.
More...
|
static | clean_orphaned_linked_logins ($issuerid=false) |
| Remove all linked logins that are using issuers that have been deleted. More...
|
|
static | confirm_link_login ($userid, $username, $issuerid, $token) |
| Look for a waiting confirmation token, and if we find a match - confirm it. More...
|
|
static | create_new_confirmed_account ($userinfo, $issuer) |
| Create an account with a linked login that is already confirmed. More...
|
|
static | delete_linked_login ($linkedloginid) |
| Delete linked login. More...
|
|
static | get_linked_logins ($userid=false) |
| List linked logins. More...
|
|
static | is_enabled () |
| Is the plugin enabled. More...
|
|
static | link_login ($userinfo, $issuer, $userid=false, $skippermissions=false) |
| Link a login to this account. More...
|
|
static | match_username_to_user ($username, $issuer) |
| See if there is a match for this username and issuer in the linked_login table. More...
|
|
static | send_confirm_account_email ($userinfo, $issuer) |
| Send an email with a link to confirm creating this account. More...
|
|
static | send_confirm_link_login_email ($userinfo, $issuer, $userid) |
| Send an email with a link to confirm linking this account. More...
|
|
static | user_deleted (\core\event\user_deleted $event) |
| Delete linked logins for a user. More...
|
|
Static list of api methods for auth oauth2 configuration.
- Copyright
- 2017 Damyon Wiese
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ clean_orphaned_linked_logins()
static auth_oauth2\api::clean_orphaned_linked_logins |
( |
|
$issuerid = false | ) |
|
|
static |
Remove all linked logins that are using issuers that have been deleted.
- Parameters
-
int | $issuerid | The issuer id of the issuer to check, or false to check all (defaults to all) |
- Return values
-
◆ confirm_link_login()
static auth_oauth2\api::confirm_link_login |
( |
|
$userid, |
|
|
|
$username, |
|
|
|
$issuerid, |
|
|
|
$token |
|
) |
| |
|
static |
Look for a waiting confirmation token, and if we find a match - confirm it.
- Parameters
-
int | $userid | |
string | $username | |
int | $issuerid | |
string | $token | |
- Return values
-
boolean | True if we linked. |
◆ create_new_confirmed_account()
static auth_oauth2\api::create_new_confirmed_account |
( |
|
$userinfo, |
|
|
|
$issuer |
|
) |
| |
|
static |
Create an account with a linked login that is already confirmed.
- Parameters
-
- Return values
-
◆ delete_linked_login()
static auth_oauth2\api::delete_linked_login |
( |
|
$linkedloginid | ) |
|
|
static |
Delete linked login.
Requires auth/oauth2:managelinkedlogins capability at the user context.
- Parameters
-
- Return values
-
◆ get_linked_logins()
static auth_oauth2\api::get_linked_logins |
( |
|
$userid = false | ) |
|
|
static |
List linked logins.
Requires auth/oauth2:managelinkedlogins capability at the user context.
- Parameters
-
int | $userid | (defaults to $USER->id) |
- Return values
-
◆ is_enabled()
static auth_oauth2\api::is_enabled |
( |
| ) |
|
|
static |
Is the plugin enabled.
- Return values
-
◆ link_login()
static auth_oauth2\api::link_login |
( |
|
$userinfo, |
|
|
|
$issuer, |
|
|
|
$userid = false , |
|
|
|
$skippermissions = false |
|
) |
| |
|
static |
Link a login to this account.
Requires auth/oauth2:managelinkedlogins capability at the user context.
- Parameters
-
array | $userinfo | as returned from an oauth client. |
core::oauth2::issuer | $issuer | |
int | $userid | (defaults to $USER->id) |
bool | $skippermissions | During signup we need to set this before the user is setup for capability checks. |
- Return values
-
◆ match_username_to_user()
static auth_oauth2\api::match_username_to_user |
( |
|
$username, |
|
|
|
$issuer |
|
) |
| |
|
static |
See if there is a match for this username and issuer in the linked_login table.
- Parameters
-
- Return values
-
stdClass | User record if found. |
◆ send_confirm_account_email()
static auth_oauth2\api::send_confirm_account_email |
( |
|
$userinfo, |
|
|
|
$issuer |
|
) |
| |
|
static |
Send an email with a link to confirm creating this account.
- Parameters
-
array | $userinfo | as returned from an oauth client. |
core::oauth2::issuer | $issuer | |
int | $userid | (defaults to $USER->id) |
- Return values
-
◆ send_confirm_link_login_email()
static auth_oauth2\api::send_confirm_link_login_email |
( |
|
$userinfo, |
|
|
|
$issuer, |
|
|
|
$userid |
|
) |
| |
|
static |
Send an email with a link to confirm linking this account.
- Parameters
-
array | $userinfo | as returned from an oauth client. |
core::oauth2::issuer | $issuer | |
int | $userid | (defaults to $USER->id) |
- Return values
-
◆ user_deleted()
Delete linked logins for a user.
- Parameters
-
- Return values
-
The documentation for this class was generated from the following file: