mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-08-29 11:00:40 +08:00
Add API Platform Framework with Symfony/Flex
This implements the basic structure that will be used for the API and core application.
This commit is contained in:
parent
bc0c674603
commit
587a79613e
115 changed files with 5489 additions and 6682 deletions
|
@ -2,9 +2,9 @@
|
|||
|
||||
namespace SuiteCRM\Core\Legacy;
|
||||
|
||||
use SuiteCRM\Core\Base\Config\ParameterCollection;
|
||||
|
||||
use SuiteCRM\Core\Legacy\LegacyHandler;
|
||||
use AuthenticationController;
|
||||
use Exception;
|
||||
use RuntimeException;
|
||||
|
||||
/**
|
||||
* Class Authentication
|
||||
|
@ -15,10 +15,10 @@ class Authentication extends LegacyHandler
|
|||
/**
|
||||
* Set the config
|
||||
*
|
||||
* @param ParameterCollection $config
|
||||
* @param $config
|
||||
* @return $this
|
||||
*/
|
||||
public function setConfig(ParameterCollection $config): self
|
||||
public function setConfig($config): self
|
||||
{
|
||||
$this->config = $config;
|
||||
|
||||
|
@ -33,18 +33,18 @@ class Authentication extends LegacyHandler
|
|||
* @param $grant_type
|
||||
*
|
||||
* @return boolean
|
||||
* @throws \Exception
|
||||
* @throws Exception
|
||||
*/
|
||||
public function login($username, $password, $grant_type = 'password'): bool
|
||||
{
|
||||
if ($this->runLegacyEntryPoint()) {
|
||||
$authController = new \AuthenticationController();
|
||||
$authController = new AuthenticationController();
|
||||
|
||||
$PARAMS = [];
|
||||
|
||||
return $authController->login($username, $password, $PARAMS);
|
||||
}
|
||||
|
||||
throw new \RuntimeException('Running legacy entry point failed');
|
||||
throw new RuntimeException('Running legacy entry point failed');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue