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