オレオレSecurityバンドル作っちゃいました

5,671
-1

Published on

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
5,671
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

オレオレSecurityバンドル作っちゃいました

  1. 1. SecurityBundle
  2. 2. SecurityBundle
  3. 3. ....CrocosSecurityBundlehttps://github.com/crocos/CrocosSecurityBundle
  4. 4. CrocosSecurityBundle
  5. 5. class MyController{ /** * @Secure */ public function doAction() { }}
  6. 6. /** * @Secure */class MyController{ public function doAction() { }}
  7. 7. Secure(*)
  8. 8. /** * @Secure */class MyController{ /** * @Secure(disabled=true) */ public function doAction() { }}
  9. 9. Secure disabled
  10. 10. /** * @Secure */class AppController {}class FooController extends AppController {}class BarController extends AppController {}
  11. 11. Secure
  12. 12. /** * @Secure * @SecureConfig( forward=“Acme:My:login”) */class MyController{ public function loginAction() { }}
  13. 13. SecureConfig forwardforward
  14. 14. /** * @Secure * @SecureConfig(domain=“default”) */class UserController {}/** * @Secure * @SecureConfig(domain=“admin”) */class AdminController {}
  15. 15. SecureConfig domaindefaultadmin
  16. 16. /** * @Secure * @SecureConfig(auth=“facebook”) */class FacebookController {}
  17. 17. SecureConfig auth sessionfacebook Facebook PHP SDK
  18. 18. SecurityContext SecurityContextcrocos_security.context(DI )
  19. 19. $context = $this->get( ‘crocos_security.context’);$user = $userRepo->find(1);$context->login($user);$context->logout();
  20. 20. login() IDlogout()
  21. 21. if ($context->isAuthenticated()) { $user = $context->getUser();}
  22. 22. isAuthenticated()getUser()
  23. 23. GitHubhttps://github.com/crocos/CrocosSecurityBundleREADME
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×