asp.net-mvc - Azure Active Directory、OWIN 和 ASP .NET MVC

标签 asp.net-mvc azure owin

VS 2013 中的库存模板不将 OWIN 与 Active Directory 配置结合使用。有谁有一个很好的例子来说明我应该如何将其与 OWIN 连接起来?我真的不想混合范例,并且想使用 OWIN 来完成所有事情。我必须使用 OpenIDConnect 包吗?

谢谢

最佳答案

Azure AD 团队已在 Github 上发布了大量示例,您可以在此处找到:https://github.com/AzureADSamples 。其中,我相信您可能会对以下两个感兴趣:

https://github.com/AzureADSamples/WebApp-MultiTenant-OpenIdConnect-DotNet

This sample shows how to build a multi-tenant .Net MVC web application that uses OpenID Connect to sign up and sign in users from any Azure Active Directory tenant, using the ASP.Net OpenID Connect OWIN middleware and the Active Directory Authentication Library (ADAL) for .NET.

https://github.com/AzureADSamples/WebApp-WebAPI-OpenIDConnect-DotNet

This sample shows how to build an MVC web application that uses Azure AD for sign-in using the OpenID Connect protocol, and then calls a web API under the signed-in user's identity using tokens obtained via OAuth 2.0. This sample uses the OpenID Connect ASP.Net OWIN middleware and ADAL .Net.

关于asp.net-mvc - Azure Active Directory、OWIN 和 ASP .NET MVC,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28486588/

相关文章:

c# - 在 MVC c# 中准备自定义 json 格式返回

jquery - 使用 http Post 的 MVC 进度条

azure - 使用 Azure Key Vault 中的 secret 替换 VSTS JSON 变量

azure - 使用 REST API 导出搜索词的 Azure Application Insights

owin - IdentityServer4 和 Web API .NET 4.6.2

c# - 如何停止为图像请求调用 Identity Framework 的 OWIN Startup 类?

asp.net-mvc-5 - 使用外部提供程序时如何记住MVC5中的登录名

javascript - IE 中的 JQuery 错误,适用于 FF。可能live有问题

asp.net-mvc - ASP.NET MVC 3 - 部分、显示模板与编辑器模板

azure - 如何防止 terraform 破坏和重新创建 vm azure vm 扩展。生命周期 block 不起作用