This repository has been archived by the owner on Apr 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstart.php
59 lines (46 loc) · 1.93 KB
/
start.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
use Goteo\Application\App;
use Goteo\Application\Config;
use Symfony\Component\Routing\Route;
// Autoload additional Classes
Config::addAutoloadDir(__DIR__ . '/src');
// Override auth routes (no prefix)
$routes = App::getRoutes();
$routes->get('auth-login')->setDefaults(array(
'_controller' => 'Goteo\Controller\AuthController\CAS::casLoginAction',
));
$routes->get('auth-login-old-route')->setDefaults(array(
'_controller' => 'Goteo\Controller\AuthController\CAS::casLoginAction',
));
$routes->get('auth-logout')->setDefaults(array(
'_controller' => 'Goteo\Controller\AuthController\CAS::casLogoutAction',
));
$routes->get('auth-logout-old-route')->setDefaults(array(
'_controller' => 'Goteo\Controller\AuthController\CAS::casLogoutAction',
));
// Needed by Goteo\Controller\PoolController::validate
$routes->get('auth-signup')->setDefaults(array(
'_controller' => 'Goteo\Controller\AuthController\CAS::casSignupAction',
));
// Hidden, only to access as local user (e.g. root)
$routes->add('auth-local-login', new Route('/local-login', array(
'_controller' => 'Goteo\Controller\AuthController::loginAction',
)));
// Hidden, only to access as local user (e.g. root)
$routes->add('auth-local-logout', new Route('/local-logout', array(
'_controller' => 'Goteo\Controller\AuthController::logoutAction'
)));
// Remove remaining routes defined in src/Routes/auth_routes.php
$routes->remove('outh-login');
$routes->remove('auth-signup-old-route');
$routes->remove('auth-oauth-signup');
$routes->remove('auth-oauth-signup-old-route');
$routes->remove('auth-password-recovery');
$routes->remove('auth-password-reset');
// Override auth routes in src/Routes/invest_routes.php
$routes->get('invest-login')->setDefaults(array(
'_controller' => 'Goteo\Controller\AuthController\CAS::casLoginAction',
));
$routes->get('invest-signup')->setDefaults(array(
'_controller' => 'Goteo\Controller\AuthController\CAS::casSignupAction',
));