Created
February 3, 2016 12:58
-
-
Save jenkoian/e8a6d4f908c314e8c3f7 to your computer and use it in GitHub Desktop.
Legacy escape route securityConfigSnippet.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ... | |
$c->loadFromExtension( | |
'security', | |
[ | |
'providers' => [ | |
'legacy' => [ | |
'id' => 'app.legacy_user_provider' | |
] | |
], | |
'encoders' => [ | |
'Acme\\Authentication\\User' => 'plaintext' | |
], | |
'firewalls' => [ | |
'main' => [ | |
'pattern' => '^/', | |
'anonymous' => true, | |
'logout' => true, | |
'guard' => [ | |
'authenticators' => [ | |
'app.legacy_authenticator' | |
], | |
], | |
], | |
], | |
'access_control' => [ | |
[ | |
'path' => '^/secret/content/only/for/moderators', | |
'role' => 'ROLE_MODERATOR' | |
], | |
] | |
] | |
); | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment