-
Notifications
You must be signed in to change notification settings - Fork 2
/
ExampleConfig.yaml
executable file
·38 lines (37 loc) · 1.49 KB
/
ExampleConfig.yaml
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
####################################
# Security - example configuration #
####################################
# These are example definition of Security component.
# In order to use the component, you first must call Security::setConfig($pathToYourConfig).
Security:
UserProviders:
Memory:
john: {password: secret, roles: 'ROLE_USER'}
admin: {password: login123, roles: 'ROLE_SUPERADMIN'}
AuthenticationProviders:
OAuth2:
Params:
Server: FBAuth
Roles: [ROLE_USER]
TwitterOAuth:
Params:
Server: MyTwitterApp
Roles: [ROLE_USER]
Firewalls:
Admin:
RealmName: Administration
Anonymous: true
Encoder: false
RememberMe: true # or number of seconds (seconds will be forwarded to token storage where it calculates token TTL)
TokenKey: SecretKey
UserProviders: [Memory, OAuth2, TwitterOAuth]
AuthenticationProviders: [Http, Form, OAuth2, TwitterOAuth]
AccessControl:
Rules:
- {Path: '/^\/[a-zA-Z0-9-_]+\/[a-zA-Z0-9-_]+\/[a-zA-Z0-9]{13}$/', Roles: ROLE_ANONYMOUS}
- {Path: '/^\/about/', Roles: ROLE_ANONYMOUS}
- {Path: '/^\/statistics/', Roles: ROLE_ANONYMOUS}
DecisionStrategy: affirmative
RoleHierarchy:
ROLE_USER: ROLE_EDITOR
ROLE_ADMIN: ROLE_USER