如何集成OWIN身份验证中间件和Sitecore

如何集成OWIN身份验证中间件和Sitecore,sitecore,owin,single-page-application,Sitecore,Owin,Single Page Application,我已经实现了一个使用Sitecore运行的MVC应用程序。OWIN的Startup类实现了如下内容: [assembly: OwinStartupAttribute(typeof(WebApplication1.Startup))] namespace WebApplication1.Web { public class Startup { public void Configuration(IAppBuilder app) { Con

我已经实现了一个使用Sitecore运行的MVC应用程序。OWIN的Startup类实现了如下内容:

[assembly: OwinStartupAttribute(typeof(WebApplication1.Startup))]
namespace WebApplication1.Web
{
   public class Startup
   {
       public void Configuration(IAppBuilder app)
       {
          ConfigureAuth(app);
       }

       public void ConfigureAuth(IAppBuilder app)
       {
           app.CreatePerOwinContext<AppIdentityDbContext>(AppIdentityDbContext.Create);
           app.CreatePerOwinContext<AppUserManager>(AppUserManager.Create);
           app.CreatePerOwinContext<AppRoleManager>(AppRoleManager.Create);

           app.UseOAuthBearerTokens(new OAuthAuthorizationServerOptions
           {
              Provider = new AppOAuthProvider(),
              AllowInsecureHttp = true,
              TokenEndpointPath = new PathString("/Authenticate")
           });
      }
  }
}
[程序集:OwinStartupAttribute(typeof(WebApplication1.Startup))]
名称空间WebApplication1.Web
{
公营创业
{
公共无效配置(IAppBuilder应用程序)
{
ConfigureAuth(app);
}
public void ConfigureAuth(IAppBuilder应用程序)
{
app.CreatePerOwinContext(AppIdentityDbContext.Create);
app.CreatePerOwinContext(AppUserManager.Create);
app.CreatePerOwinContext(applormanager.Create);
app.UseAuthBearTokens(新的OAuthAuthorizationServerOptions
{
Provider=新的AppAuthProvider(),
AllowInsecureHttp=true,
TokenEndpointPath=新路径字符串(“/Authenticate”)
});
}
}
}

我希望当我提交用户名、密码和授权时,类型值是password,方法POST为URLhttp:///Authenticate 令牌承载返回允许用户登录。不幸的是,找不到Sitecore抛出的内容,我无法找到让请求进入OWIN中间授权的方法。我该如何整理呢?

您可能需要通读@jammykam:非常感谢您的评论。听起来很有效。我会花一点时间来研究它。这是否与Sitecore一起工作?@Sivalingaamorthy:我已经找到了另一个解决方案。@Toan-Vo,你能建议解决方案吗?你能分享参考资料吗。。。