You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am developing an application in Symfony to manage multiple schools. The application has multiple databases, one for each school, and multiple CAS servers.
If I only manage a school, the configuration would be like this:
# config.yml
be_simple_sso_auth:
admin_sso:
protocol:
id: cas
version: 2
server:
id: cas
login_url: https://cas01.XXX.com/SCHOOLID/login
logout_url: https://cas01.XXX.com/SCHOOL_ID/logout
validation_url: https://cas01.XXX.com/SCHOOL_ID/serviceValidate
<?php
use Comp\BackendBundle\Controller\SchoolController;
SchoolController::loadCasConfig();
but i have this Exception:
FileLoaderLoadException: Cannot import resource
"C:\wamp\www\comp\app/config\cas.php" from
"C:\wamp\www\comp\app/config\config.yml". (Runtime Notice: Non-static method
Comp\BackendBundle\Controller\SchoolController::loadCasConfig() should not be
called statically, assuming $this from incompatible context in C:\wamp\www\comp\app\config\cas.php line 5)
:(. Then i try to insert the method code in the cas.php file:
FatalErrorException: Error: Call to undefined method
Symfony\Component\DependencyInjection\Loader\PhpFileLoader::getDoctrine() in
C:\wamp\www\comp\app\config\cas.php line 11
I'd like to know how I can dynamically generate the file cas.php, getting data from the database.
The text was updated successfully, but these errors were encountered:
I am developing an application in Symfony to manage multiple schools. The application has multiple databases, one for each school, and multiple CAS servers.
If I only manage a school, the configuration would be like this:
With one school everything works fine.
Each school accesses the application through the path app.com/school/ID, for example app.com/school/29, app.com/school/54...
I wonder if there is way to have multiple dynamic firewall depending on the ID. And use this ID to redirect each CAS URL:
https://cas01.XXX.com/school_29/login, https://cas01.XXX.com/school_54/login ...
I created a new file: app/config/cas.php, and I've added some CAS servers settings
And i import this file in config.yml
And all goes right!
Now I'm trying to generate all cas.php configuration dynamic from the Entity School. First i try creating a method in SchoolController
and call it on cas.php file
but i have this Exception:
:(. Then i try to insert the method code in the cas.php file:
and now i have:
The text was updated successfully, but these errors were encountered: