Learn about ProtectMiddleware, a middleware package designed to protect routes within Vapor.
- [Instructor] Protect Middleware is a middleware package…that protects routes from being accessed…by unauthorized users.…Protect checks against active sessions found on VAPOR…and if a user session is active and they're authorized,…then they'll be able to access that protected route.…Otherwise, they'll get returned a 403 Not Authorized error.…When creating Protect Middleware, you must pass it in error…so that it knows what type of error to throw…when dealing with an unauthorized user.…
Once you create your middleware, you can then apply it…to a route group.…Doing so protects all of the routes within the group…with Protect, and only authenticated and authorized sessions…will be granted to them.…Now that we have an understanding of authentication,…authorization, and protected routes,…let's go over all of this in code,…so that we can make sure it all makes sense.…
- Installing PostgreSQL
- Implementing a database provider and a database driver
- Working with data models
- Implementing functions such as reading, updating, and deleting persisted data
- Working with dynamic Leaf templates
- Handling authentication inside of Vapor
- Creating a login controller
- Securing certain routes within your web service
- Creating a RESTful interface
Skill Level Intermediate
iOS App Development: Test-Driven Developmentwith Harrison Ferrone2h 14m Intermediate
Swift 3 Essential Training: Beyond the Basicswith Scott Gardner2h 58m Intermediate
Learning Server-Side Swift with Vaporwith Ron Buencamino1h 30m Intermediate
1. Using Databases with Vapor
2. Installing Database Providers
3. Working with Data Models
4. User Authentication and Authorization
5. RESTful Services
Creating a RESTful interface6m 11s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.