Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 92c058213b | |||
| d29877d953 |
@@ -2,7 +2,6 @@
|
|||||||
"name": "malio/ednotif-bundle",
|
"name": "malio/ednotif-bundle",
|
||||||
"description": "Client EDNOTIF (Guichet + wsIpBNotif) pour Symfony",
|
"description": "Client EDNOTIF (Guichet + wsIpBNotif) pour Symfony",
|
||||||
"type": "symfony-bundle",
|
"type": "symfony-bundle",
|
||||||
"version": "0.0.1",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.4",
|
"php": "^8.4",
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ return static function (ContainerConfigurator $container): void {
|
|||||||
$services->set(TokenProvider::class)
|
$services->set(TokenProvider::class)
|
||||||
->args([
|
->args([
|
||||||
service('ednotif.soap.guichet'),
|
service('ednotif.soap.guichet'),
|
||||||
'%ednotif.entreprise%',
|
'%ednotif.exploitation_code%',
|
||||||
'%ednotif.zone%',
|
'%ednotif.zone%',
|
||||||
'%ednotif.application%',
|
'%ednotif.application%',
|
||||||
'%ednotif.login%',
|
'%ednotif.login%',
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ final readonly class TokenProvider
|
|||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private SoapClient $guichetClient,
|
private SoapClient $guichetClient,
|
||||||
private string $entreprise,
|
private string $exploitationCode,
|
||||||
private ?string $zone,
|
private ?string $zone,
|
||||||
private ?string $application,
|
private ?string $application,
|
||||||
private string $login,
|
private string $login,
|
||||||
@@ -59,7 +59,7 @@ final readonly class TokenProvider
|
|||||||
private function createToken(): string
|
private function createToken(): string
|
||||||
{
|
{
|
||||||
$profil = array_filter([
|
$profil = array_filter([
|
||||||
'Entreprise' => $this->entreprise,
|
'Entreprise' => $this->exploitationCode,
|
||||||
'Zone' => $this->zone,
|
'Zone' => $this->zone,
|
||||||
'Application' => $this->application,
|
'Application' => $this->application,
|
||||||
], static fn ($v) => null !== $v && '' !== $v);
|
], static fn ($v) => null !== $v && '' !== $v);
|
||||||
@@ -101,6 +101,6 @@ final readonly class TokenProvider
|
|||||||
|
|
||||||
private function getCacheKey(): string
|
private function getCacheKey(): string
|
||||||
{
|
{
|
||||||
return 'ednotif.token.'.hash('sha256', $this->entreprise.'|'.$this->login);
|
return 'ednotif.token.'.hash('sha256', $this->exploitationCode.'|'.$this->login);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ final class Configuration implements ConfigurationInterface
|
|||||||
->scalarNode('guichet_wsdl')->cannotBeEmpty()->isRequired()->end()
|
->scalarNode('guichet_wsdl')->cannotBeEmpty()->isRequired()->end()
|
||||||
->scalarNode('metier_wsdl')->cannotBeEmpty()->isRequired()->end()
|
->scalarNode('metier_wsdl')->cannotBeEmpty()->isRequired()->end()
|
||||||
|
|
||||||
->scalarNode('entreprise')->cannotBeEmpty()->isRequired()->end()
|
->scalarNode('exploitation_code')->cannotBeEmpty()->isRequired()->end()
|
||||||
->scalarNode('zone')->defaultNull()->end()
|
->scalarNode('zone')->defaultNull()->end()
|
||||||
->scalarNode('application')->defaultNull()->end()
|
->scalarNode('application')->defaultNull()->end()
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ final class EdnotifExtension extends Extension
|
|||||||
/** @var array{
|
/** @var array{
|
||||||
* guichet_wsdl:string,
|
* guichet_wsdl:string,
|
||||||
* metier_wsdl:string,
|
* metier_wsdl:string,
|
||||||
* entreprise:string,
|
* exploitation_code:string,
|
||||||
* zone:?string,
|
* zone:?string,
|
||||||
* application:?string,
|
* application:?string,
|
||||||
* login:string,
|
* login:string,
|
||||||
@@ -32,7 +32,7 @@ final class EdnotifExtension extends Extension
|
|||||||
$container->setParameter('ednotif.guichet_wsdl', $config['guichet_wsdl']);
|
$container->setParameter('ednotif.guichet_wsdl', $config['guichet_wsdl']);
|
||||||
$container->setParameter('ednotif.metier_wsdl', $config['metier_wsdl']);
|
$container->setParameter('ednotif.metier_wsdl', $config['metier_wsdl']);
|
||||||
|
|
||||||
$container->setParameter('ednotif.entreprise', $config['entreprise']);
|
$container->setParameter('ednotif.exploitation_code', $config['exploitation_code']);
|
||||||
$container->setParameter('ednotif.zone', $config['zone']);
|
$container->setParameter('ednotif.zone', $config['zone']);
|
||||||
$container->setParameter('ednotif.application', $config['application']);
|
$container->setParameter('ednotif.application', $config['application']);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user