who are you?

19
Who are you? Digging into ASP.NET Identity 2.1 Josh Gillespie

Upload: josh-gillespie

Post on 18-Aug-2015

37 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Who are you?

Who are you?Digging into ASP.NET Identity 2.1

Josh Gillespie

Page 2: Who are you?

Agenda

Page 3: Who are you?

What i s an Ident i ty?

Page 4: Who are you?

What is an Identity?

• Proof that you are who you say you are. (authentication)

• The things are you permitted to do. (authorization)

• Other information we (need to) know about you? (profile)

Page 5: Who are you?

History of Identity in .NET

• Forms and Windows Authentication

• ASP.NET Providers• Released with .NET 2.0 (2005)• Addressed common site membership requirements

• ASP.NET Simple Membership• Released with VS2010 SP1

• ASP.NET Universal Providers

Page 6: Who are you?

ASP.NET Providers

Pros

• Simple to setup

• “Just works”

Cons

• Extensibility was hard

• Testing was hard

• Other Auth approaches were hard

• Dependent on SQL Server

• Profile was hard to query

• Dependent on Forms Auth

Page 7: Who are you?

ASP.NET Simple Providers

Pros

• Profile was improved

• Easier to add to Web page apps

Cons

• Non-relational stores are hard

• Still FormsAuth dependent

• Not extensible

Page 8: Who are you?

ASP.NET Universal Providers

Pros

• Database was cleaned up

• Used EF Code First

• Can use any EF supported store

Cons

• Built on Membership, same limitations

Page 9: Who are you?

ASP.NET Ident i tyCurrently 2.1

Page 10: Who are you?

Goals

• Useable everywhere (One ASP.NET)

• Easy profile access

• Persistence agnostic

• Testable

• Role-based Authorization

• Claims-based Authorization

• Third-party Authentication

• Azure AD

• OWIN Integrated

• NuGet package

Page 11: Who are you?

So where would you star t?

Page 12: Who are you?

Interfaces

• Entities (IUser, IRole, IClaim, etc)

• Stores (IUserStore, IRoleStore, etc)

• Managers

• Misc supporting classes• TokenProviders• Validators• Factories

Page 13: Who are you?

Application

Managers

Stores

Data Access Layer

Data Storage

Factories

Token Providers

Validators

Services

Entities

Page 14: Who are you?

Closer lookDecompile and look at one “Stack”

Page 15: Who are you?

Fi le New Pro jectWhat do I get fresh out of the box?

Page 16: Who are you?

Demo Opt ions1. Change the Primary Key

2. Add a Two-Factor Authenticator Provider

Page 17: Who are you?

Takeaways

• When should you use ASP.NET Identity?

• What is it good for, what is it not good for?

• Implement only what you need.

Page 18: Who are you?

Discuss ion

Page 19: Who are you?

Thank [email protected]

@jcgillespie

http://awaitwisdom.com