Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Enterprise Application Architecture with .NET Core

You're reading from   Enterprise Application Architecture with .NET Core An architectural journey into the Microsoft .NET open source platform

Arrow left icon
Product type Paperback
Published in Apr 2017
Publisher Packt
ISBN-13 9781786468888
Length 564 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (4):
Arrow left icon
Ganesan Senthilvel Ganesan Senthilvel
Author Profile Icon Ganesan Senthilvel
Ganesan Senthilvel
Adwait Ullal Adwait Ullal
Author Profile Icon Adwait Ullal
Adwait Ullal
Habib Qureshi Habib Qureshi
Author Profile Icon Habib Qureshi
Habib Qureshi
Ovais Mehboob Ahmed Khan Ovais Mehboob Ahmed Khan
Author Profile Icon Ovais Mehboob Ahmed Khan
Ovais Mehboob Ahmed Khan
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Enterprise Architecture Concepts FREE CHAPTER 2. Principles and Patterns 3. Distributed Computing 4. Software Development Life Cycle 5. Enterprise Practices in Software Development 6. Layered Approach to Solution Architecture 7. SOA Implementation with .NET Core 8. Cloud-Based Architecture and Integration with .NET Core 9. Microservices Architecture 10. Security Practices with .NET Core 11. Modern AI Offerings by Microsoft

Creating an MVC web application project

In this section, we will create a simple MVC web application project that uses the authorization server to authenticate users and protect some action methods on controllers to see how authorization works. You can create an empty web application project and enable MVC by calling AddMvc in the ConfigureServices method and UseMvcDefaultRoute in the Configure method in the Startup class.

Adding OIDC and cookie middleware in HTTP pipeline

To use OpenID Connect Provider (OP), we need to add the middleware to our application's HTTP pipeline, so that unauthorized requests can be forwarded to the authorization server for user authentication.

Add cookie middleware and OIDC middleware as follows:

    app.UseCookieAuthentication(new...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime