Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

SymfonyCasts

Symfony 3 Security: Beautiful Authentication, Powerful Authorization

via SymfonyCasts

Overview

Ah, security! Quick run!

Wait, come back! Security in Symfony is awesome! Seriously, between things called "voters" and the Guard authentication system, you can do anything you want inside of Symfony, and the code to do it is simple and expressive.

Security has two sides: authentication (who are you?) and authorization (do you have access to do X). We'll talk about each of these, creating an traditional form login system and and API token authentication system using Json web tokens (not as scary as they sound!). Then, we'll turn to authorization, with roles, voters and other good stuff:

  • Security & Firewall Fundamentals
  • Creating a custom login form
  • Making a User (ooOOOoo)
  • User Providers (why you need them, but don't care)
  • Password Encryption
  • Logging out!
  • Protecting entire URLs with access_control(s)
  • IS_AUTHENTICATED_FULLY, IS_AUTHENTICATED_REMEMBERED
  • Checking access with roles! ROLE_USER
  • Denying access in a controller
  • What are voters?
  • Role hierarchies
  • Impersonation (switch_user)
  • Registration Form
  • Manual authentication

... and how to create a back door into your site. Just kidding! Let's make some secure sites!

Syllabus

  • The All-Important User Class
  • The UserInterface Methods (Keep some Blank!)
  • Rendering that Login Form
  • All About Firewalls
  • The LoginFormAuthenticator
  • Authenticator: getUser, checkCredentials & Success/Failure
  • The Mysterious "User Provider"
  • Logging out & Pre-filling the Email on Failure
  • Users Need Passwords (plainPassword)
  • Doctrine Listener: Encode the User's Password
  • Configuring the Encoder in security.yml
  • Authorization: access_control and Roles
  • Denying Access in a Controller
  • Dynamic Roles
  • Fetch me a User Object!
  • Role Hierarchy
  • Impersonation (Login as Someone Else)
  • Registration Form
  • Validation with the UniqueEntity Constraint
  • Validation Groups: Conditional Validation
  • Automatically Login after Registration!

Taught by

Ryan Weaver and Leanna Pelham

Reviews

Start your review of Symfony 3 Security: Beautiful Authentication, Powerful Authorization

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.