interface for saml config (#3249)
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
namespace App\Configuration;
|
namespace App\Configuration;
|
||||||
|
|
||||||
final class SamlConfiguration
|
final class SamlConfiguration implements SamlConfigurationInterface
|
||||||
{
|
{
|
||||||
private $configuration;
|
private $configuration;
|
||||||
|
|
||||||
|
|||||||
25
src/Configuration/SamlConfigurationInterface.php
Normal file
25
src/Configuration/SamlConfigurationInterface.php
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Kimai time-tracking app.
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Configuration;
|
||||||
|
|
||||||
|
interface SamlConfigurationInterface
|
||||||
|
{
|
||||||
|
public function isActivated(): bool;
|
||||||
|
|
||||||
|
public function getTitle(): string;
|
||||||
|
|
||||||
|
public function getAttributeMapping(): array;
|
||||||
|
|
||||||
|
public function getRolesAttribute(): ?string;
|
||||||
|
|
||||||
|
public function getRolesMapping(): array;
|
||||||
|
|
||||||
|
public function getConnection(): array;
|
||||||
|
}
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
namespace App\Saml;
|
namespace App\Saml;
|
||||||
|
|
||||||
use App\Configuration\SamlConfiguration;
|
use App\Configuration\SamlConfigurationInterface;
|
||||||
use OneLogin\Saml2\Auth;
|
use OneLogin\Saml2\Auth;
|
||||||
use OneLogin\Saml2\Utils;
|
use OneLogin\Saml2\Utils;
|
||||||
use Symfony\Component\HttpFoundation\RequestStack;
|
use Symfony\Component\HttpFoundation\RequestStack;
|
||||||
@@ -22,7 +22,7 @@ class SamlAuthFactory
|
|||||||
private $request;
|
private $request;
|
||||||
private $configuration;
|
private $configuration;
|
||||||
|
|
||||||
public function __construct(RequestStack $request, SamlConfiguration $configuration)
|
public function __construct(RequestStack $request, SamlConfigurationInterface $configuration)
|
||||||
{
|
{
|
||||||
$this->request = $request;
|
$this->request = $request;
|
||||||
$this->configuration = $configuration;
|
$this->configuration = $configuration;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
namespace App\Saml\User;
|
namespace App\Saml\User;
|
||||||
|
|
||||||
use App\Configuration\SamlConfiguration;
|
use App\Configuration\SamlConfigurationInterface;
|
||||||
use App\Entity\User;
|
use App\Entity\User;
|
||||||
use App\Saml\Token\SamlTokenInterface;
|
use App\Saml\Token\SamlTokenInterface;
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ final class SamlUserFactory
|
|||||||
{
|
{
|
||||||
private $configuration;
|
private $configuration;
|
||||||
|
|
||||||
public function __construct(SamlConfiguration $configuration)
|
public function __construct(SamlConfigurationInterface $configuration)
|
||||||
{
|
{
|
||||||
$this->configuration = $configuration;
|
$this->configuration = $configuration;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user