File tree Expand file tree Collapse file tree 5 files changed +54
-32
lines changed
Expand file tree Collapse file tree 5 files changed +54
-32
lines changed Original file line number Diff line number Diff line change 3636 "ext-libxml" : " *" ,
3737 "ext-SimpleXML" : " *" ,
3838 "ext-pdo" : " *" ,
39+ "ext-session" : " *" ,
3940
4041 "simplesamlphp/assert" : " ^1.1" ,
4142 "simplesamlphp/composer-module-installer" : " ^1.3" ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 99use SimpleSAML \Module \casserver \Codebooks \LegacyRoutesEnum ;
1010use SimpleSAML \Module \casserver \Codebooks \RoutesEnum ;
1111use SimpleSAML \Module \casserver \Controller \Cas10Controller ;
12+ use SimpleSAML \Module \casserver \Controller \LoggedInController ;
1213use SimpleSAML \Module \casserver \Controller \LoggedOutController ;
1314use SimpleSAML \Module \casserver \Controller \LogoutController ;
1415use Symfony \Component \Routing \Loader \Configurator \RoutingConfigurator ;
2425 ->controller ([LogoutController::class, 'logout ' ]);
2526 $ routes ->add (RoutesEnum::LoggedOut->name , RoutesEnum::LoggedOut->value )
2627 ->controller ([LoggedOutController::class, 'main ' ]);
28+ $ routes ->add (RoutesEnum::LoggedIn->name , RoutesEnum::LoggedIn->value )
29+ ->controller ([LoggedInController::class, 'main ' ]);
2730
2831 // Legacy Routes
2932 $ routes ->add (LegacyRoutesEnum::LegacyValidate->name , LegacyRoutesEnum::LegacyValidate->value )
3235 ->controller ([LogoutController::class, 'logout ' ]);
3336 $ routes ->add (LegacyRoutesEnum::LegacyLoggedOut->name , LegacyRoutesEnum::LegacyLoggedOut->value )
3437 ->controller ([LoggedOutController::class, 'main ' ]);
38+ $ routes ->add (LegacyRoutesEnum::LegacyLoggedIn->name , LegacyRoutesEnum::LegacyLoggedIn->value )
39+ ->controller ([LoggedInController::class, 'main ' ]);
3540};
Original file line number Diff line number Diff line change @@ -22,4 +22,7 @@ services:
2222 public : true
2323
2424 SimpleSAML\Module\casserver\Controller\LoggedOutController :
25+ public : true
26+
27+ SimpleSAML\Module\casserver\Controller\LoggedInController :
2528 public : true
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace SimpleSAML \Module \casserver \Controller ;
6+
7+ use SimpleSAML \Configuration ;
8+ use SimpleSAML \XHTML \Template ;
9+ use Symfony \Component \HttpFoundation \Request ;
10+ use Symfony \Component \HttpFoundation \Response ;
11+ use Symfony \Component \HttpKernel \Attribute \AsController ;
12+
13+ #[AsController]
14+ class LoggedInController
15+ {
16+ /** @var \SimpleSAML\Configuration */
17+ protected Configuration $ config ;
18+
19+ /**
20+ * Controller constructor.
21+ *
22+ * It initializes the global configuration for the controllers implemented here and injects the session service.
23+ *
24+ * @param Configuration|null $config
25+ *
26+ * @throws \Exception
27+ */
28+ public function __construct (Configuration $ config = null )
29+ {
30+ $ this ->config = $ config ?? Configuration::getInstance ();
31+ }
32+
33+ /**
34+ * Show Log out view.
35+ *
36+ * @param Request $request
37+ * @return Response
38+ * @throws \Exception
39+ */
40+ public function main (Request $ request ): Response
41+ {
42+ session_cache_limiter ('nocache ' );
43+ return new Template ($ this ->config , 'casserver:loggedIn.twig ' );
44+ }
45+ }
You can’t perform that action at this time.
0 commit comments