Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

deSymfony 2011 - Tutorial #4: Formularios y seguridad

18,677 views

Published on

Introducción a la creación de formularios en Symfony2 así como el nuevo componente de Seguridad: security.yml, creación de página de login, etc ...

Published in: Technology, Business
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

deSymfony 2011 - Tutorial #4: Formularios y seguridad

  1. 1. Tutorial #4 Formularios y Seguridad. Javier LópezJORNADAS SYMFONY 2011 1-3 JULIO, CASTELLÓN DESYMFONY.COM
  2. 2. ImportanteAlgunas partes de este presentación no se puedenentender bien sin ver el vídeo de su imparticiónPuedes ver el vídeo enhttp://bit.ly/sf-tutorial4Puedes descargar el código de partida para la presentación enhttps://github.com/desymfony/desymfony/tree/tutorial4 DESYMFONY.COM
  3. 3. Javier López Quién es este tipo● Socio fundador de Flai Webnected S.L (www.flai.es)● Programador en symfony desde symfony 1.0, allá por 2008● Zend Certified Engineer● Co-organizador de Desymfony DESYMFONY.COM
  4. 4. Formularios DESYMFONY.COM
  5. 5. Formularios Algunas apuntes● Más de dos años de desarrollo● Principal razón del retraso de la versión 2● Librería escrita desde 0● Olvida casi todo lo que conocias de symfony 1.4 DESYMFONY.COM
  6. 6. Formularios ¿Qué vamos a hacer? DESYMFONY.COM
  7. 7. Formularios Qué vamos a hacer● Crearemos la pantalla de registro = Ruta + Controlador + Vista● Crearemos la clase del formulario de registro DESYMFONY.COM
  8. 8. Seguridad DESYMFONY.COM
  9. 9. Seguridad Algunas apuntes Las 4 palabras mágicas para entender la seguridad:● Firewalls (Autenticación)● Access Control (Autorización)● Providers (Dónde están mi usuarios)● Encoders (Cómo se procesan las contraseñas) DESYMFONY.COM
  10. 10. Seguridad El proceso en imágenes Access Control Firewall / AplicaciónCliente / Autenticación Autorización DESYMFONY.COM
  11. 11. Seguridad Accediendo a una URL no protegida Anónimos No hay reglas Soy anónimo bienvenidos! Para / Access Control Firewall / AplicaciónCliente / Autenticación Autorización DESYMFONY.COM
  12. 12. Seguridad Accediendo a una URL protegida Anónimos Debes ser Soy anónimo bienvenidos! usuario registrado Access Control Firewall /perfil AplicaciónCliente Lo siento haz login / Autenticación Autorización DESYMFONY.COM
  13. 13. Seguridad Accediendo a una URL protegida sin permisos Usuario Bienvenido Deber ser registrado Javier L. administrador Access Control Firewall /admin AplicaciónCliente Lo siento, no puedes / pasar Autenticación Autorización DESYMFONY.COM
  14. 14. security.ymlapp/config/security.yml security:     firewalls: {}     access_control: {}     providers: {}     encoders:  {} DESYMFONY.COM
  15. 15. security.yml security:   firewalls:     secured_area:       pattern:    ^/       anonymous:  ~       form_login:         login_path:  /login         check_path:  /check       logout:         path:   /logout         target: /      Definimos un único firewall para la aplicación. DESYMFONY.COM
  16. 16. security.yml security:   firewalls:     secured_area:       pattern:    ^/       anonymous:  ~       form_login:         login_path:  /login         check_path:  /check       logout:         path:   /logout         target: /      Cobertura de nuestro firewall. Todas las URLs DESYMFONY.COM
  17. 17. security.yml security:   firewalls:     secured_area:       pattern:    ^/       anonymous:  ~       form_login:         login_path:  /login         check_path:  /check       logout:         path:   /logout         target: /      Aceptamos usuarios anónimos. DESYMFONY.COM
  18. 18. security.yml security:   firewalls:     secured_area:       pattern:    ^/       anonymous:  ~       form_login:         login_path:  /login         check_path:  /check       logout:         path:   /logout         target: /      Método de autenticación, formulario. Existen otras opciones. DESYMFONY.COM
  19. 19. security.yml security:   firewalls:     secured_area:       pattern:    ^/       anonymous:  ~       form_login:         login_path:  /login         check_path:  /check       logout:         path:   /logout         target: /      La ruta para acceder al formulario de login DESYMFONY.COM
  20. 20. security.yml security:   firewalls:     secured_area:       pattern:    ^/       anonymous:  ~       form_login:         login_path:  /login         check_path:  /check       logout:         path:   /logout         target: /      Ruta para comprobar la autenticación del usuario. El formulario de login se envía a estaruta. DESYMFONY.COM
  21. 21. security.yml security:   firewalls:     secured_area:       pattern:    ^/       anonymous:  ~       form_login:         login_path:  /login         check_path:  /check       logout:         path:   /logout         target: /      Información para “desautenticar” al usuario DESYMFONY.COM
  22. 22. security.yml security:   firewalls:    ## codigo anterior   access_control:     ­ { path: ^/perfil        , roles: ROLE_USER }      La URL “/perfil” sólo es accesible al ROLE_USER DESYMFONY.COM
  23. 23. security.yml security:   firewalls:   access_control:        providers:     main:       entity:         class: DesymfonyDesymfonyBundleEntityUsuario         property: emailNombre de proveedor de usuarios. Podré tener más: memoria, base de datos, xml, ... DESYMFONY.COM
  24. 24. security.yml security:   firewalls:   access_control:        providers:     main:       entity:         class: DesymfonyDesymfonyBundleEntityUsuario         property: emailNuestro proveedor es una entidad. DESYMFONY.COM
  25. 25. security.yml security:   firewalls:   access_control:        providers:     main:       entity:         class: DesymfonyDesymfonyBundleEntityUsuario         property: emailEntidad responsable de proveernos de usuarios.Para poder comportarse como tal deberá implementar UserInterface DESYMFONY.COM
  26. 26. security.yml security:   firewalls:   access_control:        providers:     main:       entity:         class: DesymfonyDesymfonyBundleEntityUsuario         property: emailPropiedad que servirá como nombre de usuario DESYMFONY.COM
  27. 27. security.yml security:   firewalls:   access_control:        providers:   encoders:     DesymfonyDesymfonyBundleEntityUsuario: sha512  Podemos definir encoders distintos para cada tipo de usuario. DESYMFONY.COM
  28. 28. security.yml Para saber más sobre todas las opciones de configuración Security Configuration Reference http://symfony.com/doc/2.0/reference/configuration/security.html DESYMFONY.COM
  29. 29. Seguridad Qué vamos a hacer●Crearemos la página de login para que el usuario se puedaautenticar●Modificaremos la entidad Usuario para que sea un proveedorde usuarios válido DESYMFONY.COM
  30. 30. Gracias.@loalfgithub.com/loalfwww.loalf.com DESYMFONY.COM

×