background preloader


Facebook Twitter

Series: Owin Authentication « Passion for Coding. Owin is the next hot thing that everyone (or at least those following the bleeding edge of .NET development) is talking about.

Series: Owin Authentication « Passion for Coding

When creating a new ASP.NET project it references Owin for the ASP.NET Identity authentication system so it’s obviously not only a hype but actively used. But what is it really and why should I care? What is this Owin thing? Owin is the under the hood interface between web servers and web applications. If you only write web applications in a single framework (such as ASP.NET MVC) an only run on one server platform (Windows with IIS) you can ignore Owin. Adding minimal OWIN Identity Authentication to an Existing ASP.NET MVC Application - Rick Strahl's Web Log. As of ASP.NET 4, ASP.NET provides a fairly useful identity system.

Adding minimal OWIN Identity Authentication to an Existing ASP.NET MVC Application - Rick Strahl's Web Log

If you create a new project and choose an MVC project and choose to add both internal and external authentication, it’s fairly straight forward to get a reasonable identity implementation into your application. However, if you have an existing application, or if the full Entity Framework based identity structure doesn’t work for you, then the process to hook up a minimal and custom implementation that uses your own domain/business model and classes is not exactly as straightforward.

You have to either rip out the pieces you don’t need from an full template install, or add the necessary pieces. In this post I hope I can show you how to do the latter, showing only the pieces that you need. Token-based Active Directory Authentication Using OWIN. ASP.NET Web Api: Understanding OWIN/Katana Authentication/Authorization Part I: Concepts.

Recently we looked at the fundamentals of the OWIN/Katana Middleware pipeline, and we then applied what we learned, and built out a minimal, OWIN-Based, self-hosted Web Api.

ASP.NET Web Api: Understanding OWIN/Katana Authentication/Authorization Part I: Concepts

In doing so, we managed to avoid the heavy weight of the System.Web library or IIS, and we ended up with a pretty lightweight application. However, all of the concepts we have discussed remain valid no matter the hosting environment. C# ASP.NET Single Sign-On Implementation. Introducing Single Sign-on to an existing ASP.NET MVC application. Implementing a single sign-on for a set of a company's business applications isn't hard if they are all new applications, especially if you use WS-Federation and and Identity server such as Thinktecture.

Introducing Single Sign-on to an existing ASP.NET MVC application

If it is a mix of new and existing applications then it helps to sort out any problems if you first understand the technology as a whole, and appreciate how it works. Jarek shares his experiences. I’m currently working on a project that requires us to integrate an existing ASP.NET MVC application with a number of new systems, both back- and front-office. The user would like them all to work together as if it were one integrated application, and a key requirement is that there should be a single sign-on (SSO) for all the web systems. Users will need to be able to navigate between pages of any or all of these applications without the tiresome chore of repeated authentication.

The diagram presents the basic steps of the SSO process for web applications using passive redirection mechanism. Introducing Single Sign-on to an existing ASP.NET MVC application. Making your ASP.NET Web API’s secure. IdentityServer3. How does SO's new auto-login feature work? I'm going to provide more than just the technical details here, as I think there are alot of implicit assumptions about global login that aren't quite correct out there.

How does SO's new auto-login feature work?

Accordingly, this is going to be really long. Design Requirements A user having logged into any SE-site will be automatically logged into every other SE-site on which they have an accountSite level logins must not fail if the global login system is downMust not present unexpected sites or information to the userMust not degrade the anonymous user experience 1 is obvious, 2 is due to a strong desire not to introduce a new network wide dependency, 3 is shorthand for "don't scare off the user," and 4 is an acknowledgement of how much of our traffic is from anonymous users. These are taken as axiomatic, any scheme that didn't fulfill all 4 was immediately discarded.

The Scheme Initial Login. Global Network Auto-Login – Stack Overflow Blog – A destination for all things related to development at Stack Overflow. Global Network Auto-Login by Jeff Atwood on September 11, 2010 We now support automatically logging in to any site in the Stack Exchange network.

Global Network Auto-Login – Stack Overflow Blog – A destination for all things related to development at Stack Overflow

By that I mean, as long as ... You have recently logged in to any Stack Exchange network siteYou hold an existing account on the target site you're navigating toYou are using the same OpenID credentials ... the site you're navigating to will automagically log you in! (We just forced every registered account in the entire network to log off and log back in to ensure that everyone has logged in under this new regime -- so everyone should meet criteria #1 by definition.) Deploying application and OWIN authorization server on separate machines. Scenario Say you’ve created a web application with the single page application template in Visual Studio 2013.

Deploying application and OWIN authorization server on separate machines

This template creates an authorization service that issues access tokens to secure the API. Suppose you want to separate out the authorization service from the application. Relationship between IdentityServer and AuthorizationServer. We released a preview version of AuthorizationServer this week.

Relationship between IdentityServer and AuthorizationServer

AuthorizationServer is an implementation of the OAuth2 design pattern and helps making API authorization easier. IdentityServer also has OAuth2 endpoints – so you might ask yourself why we started from scratch with a new project and did not just add more features to the existing IdSrv endpoints. We were also discussing this quite a bit – here’s a summary of our thinking. Separation of authentication and authorization AS (as the name implies) is all about authorization (see my post). GitHub - IdentityModel/AuthorizationServer: Sample implementation of an OAuth2 Authorization Server.

IdentityServer/IdentityServer3. Implement custom Claim based Authorization in ASP.NET MVC Web Application. To download the source code please click here Introduction Claim-based authorization is a new model of authorization introduced in Windows Communication Foundation.

Implement custom Claim based Authorization in ASP.NET MVC Web Application

This model addresses more scenarios than the popular role based security model (IIdentity, IPrincipal). This is useful when an application requires complex and fine grained control on expressing access control decisions. Role based security model may not be powerful or flexible enough and is often too coarse when we reach complex scenarios - where custom roles are often necessary to represent different combinations of permissions or rights. Some of the terms and concepts that we need to get familiar with when we talk about claim based authorization - are: Claim, ClaimSet and IAuthorizationPolicy. C# - Redirecting unauthorized controller in ASP.NET MVC. OAuth2 Framework. 1.

OAuth2 Framework

Overview The OAuth2 standard is still in the making so expect changes. We do have a persistent storage for the developer keys and related information. At this moment we do not store the OAuth tokens persistently. What this means is that a previously fetched token might not be there the next day. Effective Forms Authentication, Part 1. By Mike Gunderloy 02/02/2004 ASP.NET offers several possibilities for authenticating users, but when you come right down to it, there's only one reasonable alternative for most applications: forms authentication. This is because Windows authentication requires every user to have an account in your Windows domain (which isn't reasonable, except for intranet applications), and Passport authentication requires you to pay quite a bit of money to Microsoft. ASP.NET MVC 3 using Authentication.

C# - Any tutorials on creating an MVC3 login system without the default ASP.Net membership providers. Examining ASP.NET's Membership, Roles, and Profile - Part 1. By Scott Mitchell Introduction There's one thing messageboard websites, eCommerce websites, social network websites, and portal websites share in common: they all provide user accounts. These websites, and many others, allow (or require) visitors to create an account in order to utilize certain functionality.

For example, a messageboard website, like, allows anonymous and authenticated visitors to view and search the posts in the various forums. ASP.Net MVC 3 Custom Membership Provider with Repository Injection. In most serious ASP.NET MVC, or even legacy ASP.Net web sites, you are unlikely to want to use the default membership provider of ASP.Net.

Its dependency on SQLServer and unhealthy predilection for littering databases with hundreds tables, just to support features you don’t care about, make it distinctly unattractive. What we really want is to integrate our web site’s security with the project’s schema and bind directly to a table or repository encapsulating the users model for the site. Custom Role Provider. Часть 1 « shiftnotes. ASP.Net MVC Membership Starter Kit alternative authentication. Last week, I blogged about the ASP.Net MVC Membership Starter Kit and some of its features. Since then, Troy Goode and I are developing at warp-speed to provide a complete (Forms)Authentication starter kit for the MVC framework. Scott Guthrie also noticed our efforts, which forced us to do an official release earlier than planned. Now when I say warp-speed, here's what to think of: we added Visual Studio item templates, a nice setup program, a demo application, ...

We started with FormsAuthentication, but we have evolved into some alternatives... OpenID authentication You can add a route to the OpenID login action, and have an out-of-the box OpenID login form: Simply enter your OpenID URL, click login. Custom MembershipProvider and RoleProvider Implementations that use Web Services. Latest. ASP.NET MVC 2 Custom Membership Provider Tutorial – Part 3 « The Integrity. Continued from: ASP.NET MVC 2 Custom Membership Provider Tutorial – Part 2 In the previous part of the tutorial we implemented CreateUser method which successfully creates new user in the database.

Custom ASP.NET MVC Authorization with Facebook Connect. Custom Authentication provider by implementing IHttpModule, IPrincipal and IIdentity. Introduction. Securing your ASP.NET MVC 3 Application - Ricka on MVC and related Web Technologies. Executive Overview.