mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-24 10:22:18 +00:00
- Moved all the code related to authentication to AuthLib
- Changed configuration files autoload.php and rest.php to use AuthLib - Added new method getCheckUserAuth to controller CheckUserAuth.php - Removed libraries/FHC_Auth.php - Removed models/CheckUserAuth_model.php - Removed include/AddonAuthentication.php
This commit is contained in:
@@ -1,69 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-Helper
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016 fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link https://fhcomplete.org
|
||||
* @since Version 1.0.0
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
/**
|
||||
* FHC-Auth Helpers
|
||||
*
|
||||
* @package FH-Complete
|
||||
* @subpackage Helpers
|
||||
* @category Helpers
|
||||
* @author FHC-Team
|
||||
* @link http://fhcomplete.org/user_guide/helpers/fhcauth_helper.html
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once FHCPATH.'include/authentication.class.php';
|
||||
require_once FHCPATH.'include/AddonAuthentication.php';
|
||||
|
||||
class FHC_Auth extends authentication
|
||||
{
|
||||
/**
|
||||
* Construct
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Auth Username, Password over FH-Complete
|
||||
*/
|
||||
public function basicAuthentication($username, $password)
|
||||
{
|
||||
if ($this->checkpassword($username, $password))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* TO BE UPDATED
|
||||
*
|
||||
* Get the md5 hashed password by the addon username
|
||||
*
|
||||
* @param string $username addon username
|
||||
* @return string md5 hashed string
|
||||
*/
|
||||
public function digestAuthentication($username)
|
||||
{
|
||||
$aam = new AddonAuthentication();
|
||||
|
||||
return md5($aam->getPasswordByUsername($username));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user