对于OWIN混合身份验证 [英] Mixed authentication for OWIN

查看:222
本文介绍了对于OWIN混合身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个验证用户有两种方式:

I have two authenticate users in two ways:


  1. 如果他们是我们通过Windows的活动目录进行认证,内部用户

  2. 如果他们与该网站注册后,通过表单验证身份验证

在MVC 3/4我能够通过实现自定义成员资格提供程序和自定义角色提供程序来完成。

In MVC 3/4 I was able to accomplish this by implementing a custom membership provider and custom role provider.

是MVC 5同样可以使用OWIN和身份,以及如何能不能做到?

Is the same possible in MVC 5 using OWIN and Identity and how can it be done?

推荐答案

在本质上是一个混合模式是一个窗体身份验证使用Windows身份验证入口点,一旦用户被传递它,正常的窗体身份验证流程进行的。

In essence a mixed mode is a forms authentication with a windows authentication entry point, once the user gets passed it, the normal forms authentication flow takes place.

<一个href=\"http://www.asp.net/aspnet/overview/owin-and-katana/enabling-windows-authentication-in-katana\">Enabling Windows身份验证卡塔纳

卡塔纳目前不提供OWIN中间件Windows身份验证,因为这个功能在服务器上已有

因此​​,对于Windows身份验证工作,我不得不依靠所提供的主机之一,无论 IIS 自主机( System.Net.HttpListener 的)

So for windows authentication to work, I have to rely on one of the provided hosts, either IIS or Self-host (System.Net.HttpListener).

我做了一个解决方案,这使得它的看起来像外部提供商,映射Windows标识的外部登录。

I made a solution that makes it look like an external provider, mapping windows identities as external logins.

来源$ C ​​$ C:<一href=\"https://github.com/MohammadYounes/MVC5-MixedAuth\">https://github.com/MohammadYounes/MVC5-MixedAuth

Source code : https://github.com/MohammadYounes/MVC5-MixedAuth

这篇关于对于OWIN混合身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆