Skip to content

Commit dd56c51

Browse files
author
aengels
committed
Add sylius_admin.path_name env param
1 parent 1f95b6e commit dd56c51

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,9 @@ php:
5353
@$(DC) exec app sh
5454

5555
db-fixtures:
56-
$(DC) exec app $(BIN) sylius:fixtures:load default --no-interaction
56+
$(DC) exec app $(BIN) sylius:fixtures:load default --no-interaction
57+
58+
db-database:
59+
$(DC) exec app $(BIN) d:d:c
60+
$(DC) exec app $(BIN) d:s:u -f
61+
$(DC) exec app $(BIN) sylius:fixtures:load default --no-interaction

src/Provider/SamlConfigProvider.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,16 @@ public function __construct(
2323
private readonly string $idpSlourl,
2424
#[Autowire(env: 'SAML_IDP_CERTIFICATE')]
2525
private readonly string $idpCert,
26-
) {
26+
#[Autowire(param: 'sylius_admin.path_name')]
27+
private readonly string $syliusAdminPathName,
28+
)
29+
{
2730
}
2831

2932
/**
33+
* @return array<string, mixed>
3034
* @throws Error
3135
*
32-
* @return array<string, mixed>
3336
*/
3437
public function getConfig(): array
3538
{
@@ -47,10 +50,10 @@ public function getConfig(): array
4750
'sp' => [
4851
'entityId' => $schemeAndHost,
4952
'assertionConsumerService' => [
50-
'url' => $schemeAndHost . '/admin/login/saml/acs',
53+
'url' => $schemeAndHost . '/' . $this->syliusAdminPathName . '/login/saml/acs',
5154
],
5255
'singleLogoutService' => [
53-
'url' => $schemeAndHost . '/admin/login/saml/logout',
56+
'url' => $schemeAndHost . '/' . $this->syliusAdminPathName . '/login/saml/logout',
5457
],
5558
'privateKey' => $this->spPrivateKey,
5659
],

0 commit comments

Comments
 (0)