In this video, learn about how all authentication works in .NET web applications.
- [Instructor] We're gonna look at a couple…of different ways to provide authentication…to your Web API project.…But before we do that, I wanna show you what underlies…all of those authentication methods and makes them work.…In ASP.NET, we accomplish authentication…with the concept of a user principal object,…created for the lifetime of each request…and accessible globally to all code…within the context of that request.…To show you this concept I created…a very simple message handler for you in the Exercise Files.…
A message handler in Web API is a class…that implements DelegatingHandler.…They receive an http request and either pass it along…the MessageHandler stack or return an http response.…They can be used to intercept or alter requests…as they come into a Web API application.…Iclass is called AutoAuthenticationHandler,…because it's going to handle automatically authenticating…every request that's received.…Obviously this is not what you'd wanna do in real life,…but I hope it illustrates a point.…
You can see this class has a SendAsync method,…
AuthorJonathan "J." Tower
- Convention-based routing
- Binding your code to an HTTP request
- Validating models
- Using attributes to route requests
- Customizing attribute routes
- Data serialization and model binding
- Error handling
- Using exception filters and exception loggers
- API documentation and testing
- Securing your API
Skill Level Beginner
1. Controllers and Actions
3. Data Serialization and Model Binding
4. Error Handling
5. API Documentation and Testing
Next steps1m 38s
- 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.