【发布时间】:2015-02-20 10:09:08
【问题描述】:
我有一个需要用户登录的站点 (MVC5)。但是我无法控制用户数据库,而是有一个带有类似方法的 Web 服务。
public bool LogIn(string username, string password);
如果返回true,我需要登录用户,知道如何实现吗?
我读过这篇文章 http://www.asp.net/identity/overview/extensibility/overview-of-custom-storage-providers-for-aspnet-identity 但不知道如何创建自己的上下文,因为作者没有提供可下载的解决方案示例,所以卡在这部分。
public void ConfigureAuth(IAppBuilder app)
{
app.CreatePerOwinContext(ExampleStorageContext.Create);
app.CreatePerOwinContext(ApplicationUserManager.Create);
...
任何帮助将不胜感激,对英语不好表示抱歉。
【问题讨论】:
标签: c# asp.net-mvc