-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
68 lines (46 loc) · 1.79 KB
/
README
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
60
61
62
63
64
65
66
67
68
# Symfony CAS Plugin (for symfony 1.4) #
CAS (Central Authentication Service) is a SSO authentication system. More information (http://www.jasig.org/cas).
This plugin include the popular phpCAS librairies and map above and beyond the standard security features of symfony.
It provide a sfCASUser extending the sfBasicSecurityUser.
## Installation ##
* Install the plugin (via a package)
symfony plugin:install sfCASPlugin
* Install the plugin (via a Git clone)
git clone git://github.com/jeanmonod/sfCASPlugin.git plugins/sfCASPlugin
* Activate the plugin in the `config/ProjectConfiguration.class.php`
[php]
class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
{
$this->enablePlugins(array(
'...',
'sfCASPlugin',
));
}
}
* Configure your CAS server in `app.yml`:
all:
cas:
server_name: 'cas-server-name'
server_port: 8443
server_path: 'cas-path'
### Secure your application ###
To secure a symfony application:
* Enable the cas module in your `settings.yml`
all:
.settings:
enabled_modules: [ ... , cas]
Do not secure `cas` module, it is the module that allows the user to log in and out.
* Change the default login and secure modules in `settings.yml`
.actions:
login_module: cas
login_action: login
* Change the user class in `factories.yml`
all:
user:
class: sfCASUser
test:
user:
class: sfCASTestUser
* You're done. Now, if you try to access a secure page, you will be redirected to the CAS server login page.