mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
* use buildin php functions to handle passwords * increase cost of BCRYPT * make use of the SensitiveParameter attribute
23 lines
628 B
PHP
23 lines
628 B
PHP
<?php
|
|
|
|
if (!defined('AOWOW_REVISION'))
|
|
die('illegal access');
|
|
|
|
|
|
function extAuth(string &$usernameOrEmail, #[\SensitiveParameter] string $password, int &$userId = 0, int &$userGroup = -1) : int
|
|
{
|
|
/*
|
|
insert some auth mechanism here
|
|
|
|
set usernameOrEmail to a valid username, do not pass back the email if used for login
|
|
set userId to uid from external auth provider for identification
|
|
(optional) set userGroup to a valid userGroup (see U_GROUP_* defines)
|
|
|
|
return an AUTH_* result (see defines)
|
|
*/
|
|
|
|
return AUTH_INTERNAL_ERR;
|
|
}
|
|
|
|
?>
|