mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 08:52:21 +00:00
FHC_Auth
This commit is contained in:
@@ -144,7 +144,7 @@ $config['auth_source'] = 'library';
|
||||
| e.g: md5('admin:REST API:1234') = '1e957ebc35631ab22d5bd6526bd14ea2'
|
||||
|
|
||||
*/
|
||||
$config['auth_library_class'] = 'fhcauth';
|
||||
$config['auth_library_class'] = 'FHC_Auth';
|
||||
$config['auth_library_function'] = 'auth';
|
||||
|
||||
/*
|
||||
|
||||
@@ -43,7 +43,7 @@ class APIAuth extends APIv1_Controller
|
||||
// Load helper
|
||||
//$this->load->helper('fhcauth');
|
||||
$this->load->library('session');
|
||||
$this->load->library('Fhcauth');
|
||||
$this->load->library('FHC_Auth');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,7 +62,7 @@ class APIAuth extends APIv1_Controller
|
||||
$username = urldecode($this->get('username'));
|
||||
$password = urldecode($this->get('password'));
|
||||
|
||||
$account = $this->fhcauth->auth($username, $password);
|
||||
$account = $this->fhc_auth->auth($username, $password);
|
||||
|
||||
// perform login checks
|
||||
if (!$account)
|
||||
|
||||
@@ -25,7 +25,7 @@ require_once FCPATH.'include/authentication.class.php';
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
class Fhcauth
|
||||
class FHC_Auth
|
||||
{
|
||||
/**
|
||||
* Auth Username, Password over FH-Complete
|
||||
@@ -9,8 +9,10 @@ build_settings:
|
||||
pgsql:
|
||||
host: 'localhost;dbname=template1'
|
||||
user: 'fhcomplete'
|
||||
pass: 'fhcomplete'
|
||||
pass: 'fhcomplete'
|
||||
setup:
|
||||
shell:
|
||||
- "pkill -f fhctest"
|
||||
composer:
|
||||
directory: ""
|
||||
action: "install"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php //[STAMP] 3abac3f0262c5ea1edf63ad9637f04cd
|
||||
<?php //[STAMP] 03e135a2fbbf6131c62df2f93298f4ee
|
||||
namespace _generated;
|
||||
|
||||
// This class was automatically generated by build task
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/*
|
||||
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('test the Login API');
|
||||
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
|
||||
@@ -10,4 +10,4 @@ $I->seeResponseContainsJson([
|
||||
'success' => true,
|
||||
'message' => 'User successfully logged in']);
|
||||
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user