File tree Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 101101 $ routes ->add (RoutesEnum::FederationList->name , RoutesEnum::FederationList->value )
102102 ->controller ([SubordinateListingsController::class, 'list ' ])
103103 ->methods ([HttpMethodsEnum::GET ->value ]);
104+
105+ // Demo
106+ $ routes ->add ('demo ' , 'demo ' )
107+ ->controller (\SimpleSAML \Module \oidc \Controllers \DemoController::class);
104108};
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ services:
1717 Psr\Http\Message\StreamFactoryInterface : ' @Laminas\Diactoros\StreamFactory'
1818 Psr\Http\Message\UploadedFileFactoryInterface : ' @Laminas\Diactoros\UploadedFileFactory'
1919 League\OAuth2\Server\AuthorizationValidators\AuthorizationValidatorInterface : ' @SimpleSAML\Module\oidc\Server\Validators\BearerTokenValidator'
20+ SimpleSAML\Configuration $globalConfig : ' @simplesaml.configuration.global'
21+ SimpleSAML\Configuration $moduleConfig : ' @simplesaml.configuration.module_config'
2022
2123 SimpleSAML\Module\oidc\Controllers\ :
2224 resource : ' ../../src/Controllers/*'
@@ -131,3 +133,16 @@ services:
131133 # SSP
132134 SimpleSAML\Database :
133135 factory : [ 'SimpleSAML\Database', 'getInstance' ]
136+
137+
138+ # Demo
139+ simplesaml.configuration.global :
140+ class : SimpleSAML\Configuration
141+ factory : [ 'SimpleSAML\Configuration', 'getInstance' ]
142+ public : true
143+
144+ simplesaml.configuration.module_config :
145+ class : SimpleSAML\Configuration
146+ factory : [ 'SimpleSAML\Configuration', 'getConfig' ]
147+ public : true
148+ arguments : [ 'module_oidc.php' ]
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace SimpleSAML \Module \oidc \Controllers ;
4+
5+ use SimpleSAML \Configuration ;
6+ use Symfony \Component \HttpFoundation \Response ;
7+
8+ class DemoController
9+ {
10+ public function __construct (
11+ protected readonly Configuration $ globalConfig ,
12+ protected readonly Configuration $ moduleConfig ,
13+ )
14+ {
15+ }
16+
17+ public function __invoke (): Response
18+ {
19+ dd (
20+ $ this ->globalConfig ->toArray (),
21+ $ this ->moduleConfig ->toArray (),
22+ );
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments